middleware(['auth', 'verified'])->name('dashboard'); // Subroute for users under /dashboard/users Route::get('/dashboard/users', function () { $users = \App\Models\User::all(); return view('dashboard.users', compact('users')); })->name('dashboard.users'); Route::middleware('auth')->group(function () { Route::get('/profile', [ProfileController::class, 'edit'])->name('profile.edit'); Route::patch('/profile', [ProfileController::class, 'update'])->name('profile.update'); Route::delete('/profile', [ProfileController::class, 'destroy'])->name('profile.destroy'); }); require __DIR__.'/auth.php';