# Using Request Route::get('user/{name}', function (Request $request) { return $request->route('name'); });
Route::get('user/{id}', function ($id) { return 'User '.$id; });
Route::pattern('id', '[0-9]+'); Route::get('user/{id}', function ($id) { // Only executed if {id} is numeric... });
Route::get('user/profile', [UserProfileController::class, 'show'])->name('profile');
Route::view('/welcome', 'welcome'); Route::view('/welcome', 'welcome', ['name' => 'Taylor']);