Answers for "add extra param with route() in laravel"

PHP
1

how to pass parameter in routes of laravel

##Defining Route:##
Route::get('edit-industry/{id}', ['as' => 'admin.editIndustry', 'uses' => 'Industries@edit']);

##Calling Route:##
{{ route('admin.editIndustry',[$id]) }}
Posted by: Guest on October-17-2021
0

laravel route name with parameters

Route::get('/user/{id}/profile', function ($id) {
    //
})->name('profile');

$url = route('profile', ['id' => 1]);
Posted by: Guest on November-18-2021

Code answers related to "add extra param with route() in laravel"

Browse Popular Code Answers by Language