name('admin.')->group(function () { Route::get('login', [AuthController::class, 'showLogin'])->name('login'); Route::post('login', [AuthController::class, 'login'])->name('login.submit'); Route::middleware('auth:admin')->group(function () { Route::post('logout', [AuthController::class, 'logout'])->name('logout'); Route::get('/', [AuthController::class, 'home'])->name('home'); Route::get('devices', [DeviceController::class, 'index'])->name('devices.index'); Route::get('devices/{device}', [DeviceController::class, 'show'])->name('devices.show'); Route::get('devices/{device}/photos/{photo}', [DeviceController::class, 'photo'])->name('devices.photo'); Route::get('logs', [RawLogController::class, 'index'])->name('logs.index'); Route::get('logs/{file}', [RawLogController::class, 'show'])->name('logs.show'); }); });