Currently I have these 4 resourceful routes in my web.php
file.
Route::resource('campaigns', 'CampaignController')->except(['show']);
Route::resource('users', 'UserController')->except(['show']);
Route::resource('models', 'ModelController')->except(['show']);
Route::resource('trims', 'TrimController')->except(['show']);
And I can't help but wonder. Can't I add something to the Route::resources
function to make it behave this way? This because they all have one thing in common. They except()
the show()
method.
It want to have something like this. (This example does not work because resources()
does not have an except()
method.
Route::resources([
'campaigns' => 'CampaignController',
'users' => 'UserController',
'models' => 'ModelController',
'trims' => 'TrimController'
])->except(['show']);