Auto-registration All controllers in Laravel 4

In L4, is there an equivalent to L3 Route::controller(Controller::detect()); ?

+4
source share
2 answers

I don't think there is an equivalent, but it's easy to register your controllers:

 Route::controller('users', 'UserController'); 

The controller method takes two arguments. The first is the base URI the controller processes, and the second is the name of the controller class.

+2
source

This, most likely, will not be implemented in laravel 4, the reason is that the autoload of all contollers is violated by design. In laravel, the order defined by the controllers means that autoload of all controllers can break your application.

+2
source

All Articles