1Route::prefix('admin')->group(function () {
2 Route::get('/users', function () {
3 // Matches The "/admin/users" URL
4 });
5});
1Route::namespace('Admin')->group(function () {
2 // Controllers Within The "App\Http\Controllers\Admin" Namespace
3});
1use App\Models\User;
2
3Route::get('/users/{user}', function (User $user) {
4 return $user->email;
5});