gpt4 book ai didi

php - "There are no commands defined in the ' 命令 ' namespace."在运行命令 :make in Laravel 之后

转载 作者:IT王子 更新时间:2023-10-28 23:59:15 25 4
gpt4 key购买 nike

就像标题一样。我正在尝试从 artisan 那里跑

php artisan command:make NameOfCommand

但我只看到了

There are no commands defined in the "command" namespace.

知道这是什么吗?

最佳答案

正如文档所说(目前的版本是 5.2):

Once your command is finished, you need to register it with Artisan so it will be available for use. This is done within the app/Console/Kernel.php file.

您必须在 Kernel.php 文件中添加:
protected $commands = [
命令\NameOfCommand::类
];

(引用:https://laravel.com/docs/5.2/artisan#registering-commands)

关于php - "There are no commands defined in the ' 命令 ' namespace."在运行命令 :make in Laravel 之后,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32396158/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com