希望它会有所帮助:) I am trying to execute some custom artisan command from controller likeArtisan::call('php artisan MyCustomCommand');but it works fine when I executephp artisan MuCustomCommand from CLI.I have registered command in app/start/artisan.php.Even Artisan::call('php artisan --help'); is not working. 解决方案 You should run artisan command like this from your controller .Example : Artisan::call('migrate:install');So Instead of doing Artisan::call('php artisan MyCustomCommand');You should do Artisan::call('MyCustomCommand');Here is the documentationHope it helps :) 这篇关于从Laravel 4.2 Controller运行Artisan Command的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!
08-13 15:49