I use Laravel 8. How to add except rule in Route::resources? I want to achieve something like the below:
Route::resources(
[
'designations' => 'DesignationController',
'locations' => 'locationController'
],
[
'except' => ['edit']
]
);
I noticed that the above is possible with Route::apiResources (as explained here: how to use apiReources method with `only`?) but not with Route::resources.
Edit
It was an issue with my IDE, where Route::resources
was referring to a different version of resources
function. The above route definition is correct.