Laravel实用型文档,想学习laravel的推荐看一看!
控制器路由(Controller Routing)
Controllers provide another way to manage your application logic. If you're unfamiliar with controllers you may want to read about controllers and return to this section.
It is important to be aware that all routes in Laravel must be explicitly defined, including routes to controllers. This means that controller methods that have not been exposed through route registration cannot be accessed. It's possible to automatically expose all methods within a controller using controller route registration. Controller route registrations are typically defined in application/routes.php.
Most likely, you just want to register all of the controllers in your application's "controllers" directory. You can do it in one simple statement. Here's how:
The Controller::detect method simply returns an array of all of the controllers defined for the application.
If you wish to automatically detect the controllers in a bundle, just pass the bundle name to the method. If no bundle is specified, the application folder's controller directory will be searched.