middleware('auth'); // store - store new device Route::post('/devices', [DeviceController::class, 'store'])->middleware('auth'); // Device purchasing routes //Route::get('/devices/{device}/purchasing/create', [PurchasingInformationController::class, 'create']); //Route::post('/devices/{device}/purchasing', [PurchasingInformationController::class, 'store']); Route::get('/devices/{device}/purchasing/edit', [PurchasingInformationController::class, 'edit']); Route::put('/devices/{device}/purchasing', [PurchasingInformationController::class, 'update']); //Route::delete('/devices/{device}/purchasing', [PurchasingInformationController::class, 'destroy']); // Device location routes Route::get('/devices/{device}/locations/create', [LocationTransactionController::class, 'create']); Route::post('/devices/{device}/locations', [LocationTransactionController::class, 'store']); Route::get('/devices/locations/{location}/edit', [LocationTransactionController::class, 'edit']); Route::put('/devices/locations/{location}', [LocationTransactionController::class, 'update']); Route::delete('/devices/locations/{location}', [LocationTransactionController::class, 'destroy']); // Device owner routes Route::get('/devices/{device}/owners/create', [OwnerTransactionController::class, 'create']); Route::post('/devices/{device}/owners', [OwnerTransactionController::class, 'store']); Route::get('/devices/owners/{owner}/edit', [OwnerTransactionController::class, 'edit']); Route::put('/devices/owners/{owner}', [OwnerTransactionController::class, 'update']); Route::delete('/devices/owners/{owner}', [OwnerTransactionController::class, 'destroy']); // // edit - show edit form Route::get('devices/{device}/edit', [DeviceController::class, 'edit'])->middleware('auth'); // update - update device Route::put('devices/{device}', [DeviceController::class, 'update'])->middleware('auth'); // destroy - delete device Route::delete('devices/{device}', [DeviceController::class, 'destroy'])->middleware('auth'); // show - show sigle device Route::get('/devices/{device}', [DeviceController::class, 'show']); //User routes // create - show register form Route::get('/register', [UserController::class, 'create']); // store - store new user Route::post('/users', [UserController::class, 'store']); // login - show user login form Route::get('/login', [UserController::class, 'login'])->name('login'); // authenticate - log in user Route::post('/users/authenticate', [UserController::class, 'authenticate']); // logout - log out user Route::post('/logout', [UserController::class, 'logout']);