Returns text with the user name passed through request URL
Route::get('/users/{name}', function ($name) {
    return 'This is a user ' . $name;
});
Two parameters passed through the request URL
Route::get('/users/{name}/{id}', function ($name, $id) {
    return 'This is a user ' . $name .' with an id of '. $id;
});
by Valeri Tandilashvili
4 years ago
Laravel
routes
Laravel From Scratch
0
Pro tip: use ```triple backticks around text``` to write in code fences