尝试在 Laravel 4 (Illuminate) 中注册所有控制器路由时,我收到一条错误消息,方法是添加:
I am getting an error message when trying to register all the controller routes in Laravel 4 (Illuminate) by adding:
Route::controller(Controller::detect());
到我的 routes.php
错误:
Error: Call to undefined method IlluminateRoutingControllersController::detect() in C:wampwww ravlessapp
outes.php line 13
我想他们更改了函数名称,但我不知道在哪里可以找到它,因为它仍然是 alpha 版本并且没有我知道的文档.
I suppose they changed the function name, but I don't know where to find it because it is still an alpha version and there is no documentation I'm aware of.
由于不同文件系统的行为不一致,该函数已在 Laravel 4 中删除.注册控制器的正确方法应该是明确定义您希望在路由文件中使用的每一个.
This function has been removed in Laravel 4 because of inconsistent behavior with varying filesystems. The proper way to register controllers should be to explicitly define each one you wish to use in your routes file.
这篇关于Controller::detect() 在 Laravel 4 中未定义的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!