我在运行Lumen的Artisan时遇到了问题。大多数命令都缺失了。
例如,如果我写php artisan routes
,我会收到以下错误:命令"路由"没有定义。
下面是输入php artisan的输出示例。
Laravel Framework version Lumen (5.2.5) (Laravel Components 5.2.*)
Usage:
command [options] [arguments]
Options:
-h, --help Display this help message
-q, --quiet Do not output any message
-V, --version Display this application version
--ansi Force ANSI output
--no-ansi Disable ANSI output
-n, --no-interaction Do not ask any interactive question
--env[=ENV] The environment the command should run under.
-v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
Available commands:
help Displays help for a command
list Lists commands
migrate Run the database migrations
cache
cache:clear Flush the application cache
db
db:seed Seed the database with records
make
make:migration Create a new migration file
migrate
migrate:install Create the migration repository
migrate:refresh Reset and re-run all migrations
migrate:reset Rollback all database migrations
migrate:rollback Rollback the last database migration
migrate:status Show the status of each migration
queue
queue:failed List all of the failed queue jobs
queue:flush Flush all of the failed queue jobs
queue:forget Delete a failed queue job
queue:listen Listen to a given queue
queue:restart Restart queue worker daemons after their current job
queue:retry Retry a failed queue job
queue:work Process the next job on a queue
schedule
schedule:run Run the scheduled commands
有没有人有任何想法如何解决这个问题?
答案 0 :(得分:1)
Lumen本身不支持route
命令。但是,在Laravel中,您可以执行以下操作:
使用php artisan list
显示所有命令。
您尝试使用的命令应为php artisan route:list
答案 1 :(得分:0)
您需要手动使用Laravel或创建命令,或使用类似于Lumen Route List的包。