如何在我的php代码中使用Artisan命令行,例如:php artisan --version
到<?php echo 'version show here'; ?>
。
最佳答案
您可以从 Controller 中调用Artisan命令,如下所示:
//calling of migrate install
Artisan::call('migrate:install');
即使用
Artisan::call('Commandname');
有关更多信息,请检查this
关于php - 如何在代码Laravel中使用Artisan命令?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35313052/