Chacha Lucas
0
Q:

laravel route

# Using Request
Route::get('user/{name}', function (Request $request) {
    return $request->route('name');
});
4
Route::get('user/{id}', function ($id) {
    return 'User '.$id;
});
2
Route::get('user/profile', [UserProfileController::class, 'show'])->name('profile');
2
Route::view('/welcome', 'welcome');

Route::view('/welcome', 'welcome', ['name' => 'Taylor']);
0
Route::get('posts/{post}/comments/{comment}', function ($postId, $commentId) {
    //
});
0

New to Communities?

Join the community