I am currently using artisan with laravel and I get the following error if I try to run any command with artisan (such as php artisan optimize
):
[Symfony\Component\Debug\Exception\FatalErrorException] Class 'Artisan' not found
I haven't seen this error anywhere on the internet and frankly am confused that it has showed up. I haven't altered any of the the core code and I have tried composer dump-autoload
with no success. Any ideas would be appreciated.
Inside config/app.php
ensure you have an alias set up like so:
return [
'aliases' => [
// ...
'Artisan' => Illuminate\Support\Facades\Artisan::class,
// ...
]
];
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