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