我正在尝试从控制器执行一些自定义的艺匠命令,如下所示:
我已经在
Artisan::call('php artisan MyCustomCommand');
但是在CLI中执行时很好用:
php artisan MuCustomCommand
.我已经在
app/start/artisan.php.
中注册了该命令。
即使Artisan::call('php artisan --help');
也不能工作。
app/Console/Kernel.php
文件中注册你的命令。 - Alankar More