[英]Fatal error: Uncaught ReflectionException: Class "env" does not exist
After lunching the command php artisan optimize
, i got吃完命令
php artisan optimize
后,我得到了
fatal error: Uncaught ReflectionException: Class "env" does not exist
致命错误:未捕获的 ReflectionException:Class “env”不存在
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.我尝试删除 bootstrap/cache/ 并运行
composer update
但没有任何效果,每次我尝试运行php artisan 命令/composer 命令时我都会遇到同样的问题。 am really stuck.我真的卡住了。 any help.
任何帮助。
You can clear cache using:您可以使用以下方法清除缓存:
php artisan optimize:clear
Or only clear config cache using:或者只使用以下方法清除配置缓存:
php artisan config:clear
https://dev.to/kenfai/laravel-artisan-cache-commands-explained-41e1 https://dev.to/kenfai/laravel-artisan-cache-commands-explained-41e1
Maybe you have something wrong in your config/database.php file.也许你的 config/database.php 文件有问题。 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
如果是这种情况,当您运行composer update时,由于 config/database.php 文件,控制台将在执行结束时显示一些错误
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.