How can i run these artisan commands in my application that is hosted in the net? Is there like a cmd in my cpanel where i can do these commands? Thanks in advance.
Actually in Cpanel no commands for php and composer related run because everytime you upload your projects on Cpanel you have to compile it down in your local and then upload it. Alternatively, get the SSH access from your Cpanel and after successful SSH login try running your various artisan commands you want.
Now in Laravel 5.8, you cannot pass object to call() func. You must pass an array [] as second argument to call() func.
Route::get('/clear-cache', function() {
$output = [];
\Artisan::call('cache:clear', $output);
dd($output);
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With