1Route::pattern('id', '[0-9]+');
2Route::get('user/{id}', function ($id) {
3 // Only executed if {id} is numeric...
4});
1Route::get('user/profile', [UserProfileController::class, 'show'])->name('profile');
1Route::view('/welcome', 'welcome');
2
3Route::view('/welcome', 'welcome', ['name' => 'Taylor']);
1Route::get('posts/{post}/comments/{comment}', function ($postId, $commentId) {
2 //
3});