route blade laravel code example
Example 1: add id to route name in laravel blade
route('something.edit', ['id' => $event->data->id])
Example 2: laravel route param blade
<a class="nav-link" href=" {{ route('profiles.show',$logged_user) }}">
Example 3: route() and with() in laravel
Route::get('user/{id}/profile', function ($id) {
})->name('profile');
$url = route('profile', ['id' => 1, 'photos' => 'yes']);
Example 4: laravel route
Route::get('user/{id}', function ($id) {
return 'User '.$id;
});
Example 5: laraval routing
Route::redirect('/here', '/there', 301);
Example 6: laravel route
Route::get('user/profile', [UserProfileController::class, 'show'])->name('profile');