Saturday, April 15, 2017

How do you define a shorthand route that passes a parameter to the controller in Laravel

Route::get('/restaurant-detail/{id}', [
// 'as'    => 'restaurant-detail-{id}', // is this legal?
'uses'  => 'RestaurantsController@getRestaurantDetail'
]);

How would you get the value of {id} if this is not legal?



via Web Dev Mike

Advertisement