laravel-dotenv-editor icon indicating copy to clipboard operation
laravel-dotenv-editor copied to clipboard

If I want to access the admin dashboard I get this error. Target class [admin] does not exist.

Open pakflex opened this issue 1 month ago • 0 comments

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'));
}

pakflex avatar Jan 19 '25 01:01 pakflex