laravel-dotenv-editor
laravel-dotenv-editor copied to clipboard
If I want to access the admin dashboard I get this error. Target class [admin] does not exist.
Here is my routes Route::middleware(['auth:sanctum', 'verified', 'admin'])->group(function () { Route::get('/admin/dashboard', [AdminController::class, 'dashboard'])->name('admin.dashboard');
Controller.
public function dashboard() { $todayRecords = AttendanceRecord::with('staff') ->whereDate('scan_time', today()) ->latest() ->get();
$totalStaff = Staff::count();
return view('admin.dashboard', compact('todayRecords', 'totalStaff'));
}