我在内核命令中工作,我需要更改旧命令:
旧命令是:
php artisan crawl:author
现在我需要将其重命名为:
php artisan crawl-bq:author
在我的命令文件签名中更改为:
protected $signature = 'crawl-bq:author';
我使用以下命令清理了 artisan 缓存:
php artisan cache:clear
php artisan config:cache
我的旧命令仍然有效,新命令也有效。但是当我看到 artisan 列表“php artisan list”时,那里也看不到旧命令。
有人可以帮助我吗?
最佳答案
旧命令是:
php artisan crawl:author
现在我们将其重命名为“crawl-bq:author”
php artisan crawl-bq:author (Will Work)
php artisan crawl-b:author (Will Work)
php artisan craw:author (Will Work)
php artisan crawl:author (Will Work)
解决方案
用其他名称重命名它,例如“newcrawl-bq:author”
php artisan crawl:author (Not work)
php artisan crawl-bq:author (Not work)
php artisan newcrawl-bq:author (Will work)
关于php - 在 laravel 5.2 内核控制台中通过新的 artisan 命令删除旧的 artisan 命令,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36570228/