When I add additional methods to a resource controller, like for example getHistory()
or getStats()
, the only way I can auto-detect them to avoid writing more routes is like that:
Route::controller('users','UsersController');
Route::resource('users','UsersController');
I believe the controller method will route only the prefixed methods and the resource method will not override them.
Is there not a better way to define custom routes according to additional methods inside a resource controller? Like an array as a parameter to it?