1
我使用Laravel 5并注意到每当我通过cmd执行php artisan route:list
命令时都会发生奇怪的事情。当使用route时,Laravel getPath()无法识别:列表
这是给我的一个错误: [Symfony\Component\Debug\Exception\FatalErrorException] Call to a member function getPath() on a non-object
的代码,它指的是这样的: Route::getCurrentRoute()->getPath()
但是,当我转储代码,没有错误被抛出,这是正确的显示当前路线。
运行php artisan serve
时也没问题。使用php artisan route:list
命令时发生错误。 Route::getCurrentRoute()->getUri()
任何人都知道这里发生了什么? 非常感谢!
哪个文件引发动作?你需要给它更多的信息。 – itachi