Closed Jhon-Marulanda closed 9 months ago
Hi @Jhon-Marulanda , you could run Artisan::command('migrate:generate')
from your controller, I think it should work.
Reference: https://laravel.com/docs/10.x/artisan#closure-commands
Hi @kitloong, It doesn't work, it doesn't respond, and it doesn't return errors. try doing this with Artisan::call('migrate:generate')
But he says he doesn't recognize the command.
Hi @Jhon-Marulanda I am sorry for being late. May I know if your issue has been resolved?
Hello! Can I execute the command php artisan migrate:generate from some controller or trait? I need to be able to do it from the code and not from console, thanks (Laravel 10).