You have to move the
Route::get('service/create', 'ServicesController@create');
above
Route::get('service/{id}', 'ServicesController@show');
In your case, simply switch the order of the grouped routes.
TorchSK said:
You have to move the
Route::get('service/create', 'ServicesController@create');
above
Route::get('service/{id}', 'ServicesController@show');
In your case, simply switch the order of the grouped routes.
This solution worked.
I have those in separate authorization groups. Does this mean the routes need to be listed in order of most restrictive to least restrictive in the routes file?
Well... yes. I suppose it works in a way that when the first match of the route is found, this route is used.
Route::get('service/create', 'ServicesController@create');
and
Route::get('service/{id}', 'ServicesController@show');
are the same in exactly one case. When {id}=create.
So when service/{id} is first, the desired service/create route could actually never be hit.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community