<a class="nav-link" href=" {{ route('profiles.show',$logged_user) }}">
Route::get('/menu/{category}/{product}/{item}', ['as' => 'named.route' , 'uses' => 'MenuController@listItem']);
// to get the actual linke
route('named.route', ['category' => $category->id, 'product' => $product->id, 'item' => $item->id]);
//Swap out PARAMETER_HERE with the specific parameter you need.
Route::current()->parameter('PARAMETER_HERE')
//A common use case for this would be to output specific content based on conditional logic.
@if( Route::current()->parameter('account') === 'edit' )
//Edit Account Form Here
@endif
Route::get('user/profile', function () {
//
})->name('profile');
Route::get('/posts/{post}/comments/{comment}', function ($postId, $commentId) {
//
});
Route::get('/user/{name}', function ($name) {
//
})->where('name', '[A-Za-z]+');
Route::get('/user/{id}', function ($id) {
//
})->where('id', '[0-9]+');
Route::get('/user/{id}/{name}', function ($id, $name) {
//
})->where(['id' => '[0-9]+', 'name' => '[a-z]+']);
reference : https://laravel.com/docs/8.x/routing#parameters-regular-expression-constraints
Route::redirect( "old link", "new link" );
Route::get('/user/{id}/profile', function ($id) {
//
})->name('profile');
$url = route('profile', ['id' => 1]);