[Request] Simplify Naming of RESTful Controller Routes
As it stands to create a named route for, say, FooController@getSomeMethod we would need to do the following:
Route::controller('/foo', 'FooController');
Route::get('/foo/some-method', array('as' => 'fooPage', 'uses' => 'FooController@getSomeMethod'));
This can start to get unwieldily for applications with the need for many named routes across multiple controllers. It think it would be a bit more DRY if we could do something like:
Route::controller('/foo', 'FooController')->named(array('fooPage' => 'getSomeMethod'));
Or any derivative therein. Anyone have any input on this?
:+1:
Name controller routing would be awesome.
would this be suitable? https://github.com/illuminate/routing/pull/33
:+1:
:+1:
made a new pull-request for this repo. https://github.com/laravel/framework/pull/998