Update laravel/documentation/routing.md

Added a warning about using Controller::detect() for routing.
This commit is contained in:
Shawn McCool 2012-09-19 18:13:31 +03:00
parent 8fea602969
commit 33b5f6377c
1 changed files with 2 additions and 0 deletions

View File

@ -295,6 +295,8 @@ #### Register all controllers 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. 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.
> **Note:** It is important to note that this method gives you no control over the order in which controllers are loaded. Controller::detect() should only be used to Route controllers in very small sites. "Manually" routing controllers gives you much more control, is more self-documenting, and is certainly advised.
#### Register all controllers for the "admin" bundle: #### Register all controllers for the "admin" bundle:
Route::controller(Controller::detect('admin')); Route::controller(Controller::detect('admin'));