Fatal error: Uncaught ReflectionException: Class "env" does not exist

Viewed 473

After lunching the command php artisan optimize , i got

fatal error: Uncaught ReflectionException: Class "env" does not exist

I have tried deleting the bootstrap/cache/ and runing composer update but nothing works, everytime i tried to run a php artisan command/composer command i got the same problem. am really stuck. any help.

2 Answers

Maybe you have something wrong in your config/database.php file. If it is the case when you run composer update the console will show some error at the end of execution due the config/database.php file

Related