Answers for "how to pass parameter in laravel route"

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

passing parameters with route keyword in blade laravel

<a href="{{ route('blog.by.slug', ['slug' => 'someslug']) }}">...</a>
Posted by: Guest on June-19-2021
5

named route with parameter laravel

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]);
Posted by: Guest on May-29-2020

Code answers related to "how to pass parameter in laravel route"

Browse Popular Code Answers by Language