Laravel 5.2 php 工匠路线不起作用

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/36077692/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-14 13:26:13  来源:igfitidea点击:

Laravel 5.2 php artisan routes not working

laravellaravel-5lumen

提问by Mansoor H

In Laravel 5.2, trying to display the routes list using php artisan routes. But, its not working. It will show the below errors,

在 Laravel 5.2 中,尝试使用php artisan routes. 但是,它不起作用。它将显示以下错误,

[Symfony\Component\Console\Exception\CommandNotFoundException]
Command "routes" is not defined.

[Symfony\Component\Console\Exception\CommandNotFoundException]
命令“路由”未定义。

How to fix this issue??

这个问题怎么解决??

Thanks

谢谢

回答by Alexey Mezenin

It is php artisan route:listsince Laravel 5.1

这是php artisan route:list因为Laravel 5.1

UPDATE

更新

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.

看来您使用的是 Lumen,而不是 Laravel。不幸的是 Lumen 中的命令并不多,所以如果你真的需要使用它们,你可以创建它们或者只是使用 Laravel 框架而不是 Lumen。

Or you can use package like:

或者你可以使用像这样的包:

https://github.com/sohelamin/lumen-route-list

https://github.com/sohelamin/lumen-route-list