Answers for "How can I pass parameter from Route in laravel and get in function"

PHP
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 can I pass parameter from Route in laravel and get in function"

Browse Popular Code Answers by Language