Support the ongoing development of Laravel.io →
Requests Views Forms
Last updated 2 years ago.
0

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');
0

Sign in to participate in this thread!

Eventy

Your banner here too?

Finsok333 finsok333 Joined 23 Dec 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.