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.
百度搜索“77cn”或“免费范文网”即可找到本站免费阅读全部范文。收藏本站方便下次阅读,免费范文网,提供经典小说综合文库Laravel入门中文手册(17)在线全文阅读。
相关推荐: