I am working on an Lumen project.
I try to use
Artisan::call('my-command')
But PHP says me the class Artisan is not defined.
I have already enable Facade with the following command :
$app->withFacades();
So the Log class works after use Log; line. I have already add the use Artisan line. But it doesn't works.
The following command works in CLI:
php artisan my-command
Do you have any idea ?
This error occured because I use a wrong use sentence :
use Artisan; // Doesn't work
I must use this absolute use sentence :
use Illuminate\Support\Facades\Artisan;
I hope it will be helpful
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