I was wondering if there is a more elegant or in any way "correct" way of adding additional routes to resource controller?
For instance I could have UsersController
and route it with
Route::resource('users', 'UserController');
And it will route methods according to Laravel docs
But if for any reason I wanted to add a method outside of this scope I could do something like
Route::get('users/token', 'UserController@authToken');
So obviously this works, but is there another way of doing this?
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire