How can I pass parameter to a controller from a route in laravel?
This is my route:
Route::get('/{slug}','SampleController@showCms'); This is my controller function:
public function showCms($slug){} I want to route '/' also from this slug:
route(Route::get('/{slug}','SampleController@showCms')) How can this be accomplished?
route(Route::get('/{slug}','SampleController@showCms'))supposed to be? Both routes are the same, what exactly are you trying to do?