You are using Route::controller
and not Route::resource
so it obviously fails because ::controller
routes does not have aliases. As far as I remember you can pass third parameter to actually bind methods in controller to aliases(named routes) like:
Route::controller('rooms', 'RoomsController', [
'update' => 'postUpdate',
'stuff' => 'getStuff'
]);
etc. But I highly advice to use Route::resource
as it is a cleaner way to manage basic CRUD and if you need something more specific you just add more complex route above the resource
route like:
Route::get('rooms/something/{id}', ['as' => 'rooms.something', 'uses' => 'RoomsController@something']);
Route::resource('rooms', 'RoomsController');
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community