Laravel 5.2 PHP工匠路线无法正常工作 [英] Laravel 5.2 php artisan routes not working
问题描述
在Laravel 5.2中,尝试使用php artisan routes
显示路线列表.但是,它不起作用.它将显示以下错误,
In Laravel 5.2, trying to display the routes list using php artisan routes
. But, its not working. It will show the below errors,
[Symfony \ Component \ Console \ Exception \ CommandNotFoundException]
未定义命令"routes".
[Symfony\Component\Console\Exception\CommandNotFoundException]
Command "routes" is not defined.
如何解决此问题?
谢谢
推荐答案
从Laravel 5.1开始就是php artisan route:list
It is php artisan route:list
since Laravel 5.1
更新
似乎您使用的是Lumen,而不是Laravel.不幸的是,Lumen中的命令并不多,因此,如果您真的需要使用它们,则可以创建它们,也可以只使用Laravel框架代替Lumen.
It seems you're using Lumen, not Laravel. Unfortunately there are not many commands in Lumen, so if you really need to use them, you can create them or just use Laravel framework instead of Lumen.
或者您可以使用以下软件包:
Or you can use package like:
https://github.com/sohelamin/lumen-route-list
这篇关于Laravel 5.2 PHP工匠路线无法正常工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!