1
Hello! I am studying Arabic, and I would like to know if it is possible to call the Artisan commands in the Controllers. Example: When the user clicks on the button he executes an Artisan command, a routine or something related.
1
Hello! I am studying Arabic, and I would like to know if it is possible to call the Artisan commands in the Controllers. Example: When the user clicks on the button he executes an Artisan command, a routine or something related.
1
The version of Laravel was missing but at least in 5.1 you can use the Facade of Artisan
use Illuminate\Support\Facades\Artisan;
and within the function:
Artisan::call('down');
In the example I gave the Laravel was put in maintenance mode.
Browser other questions tagged php laravel artisan
You are not signed in. Login or sign up in order to post.
Thank you! That’s exactly what I was looking for!
– Igor Carlos