简体   繁体   English

致命错误:未捕获的 ReflectionException:Class “env”不存在

[英]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.

相关问题 致命错误:未捕获的 ReflectionException:Class 配置不存在 - Fatal error: Uncaught ReflectionException: Class config does not exist Laravel 5.6:未捕获的反射异常:类 env 不存在 - Laravel 5.6: Uncaught ReflectionException: Class env does not exist 未捕获的 ReflectionException:升级到 Laravel 5.6 后类 env 不存在 - Uncaught ReflectionException: Class env does not exist after upgrade to Laravel 5.6 Laravel 5.1.11致命错误:消息为“类日志不存在”的未捕获异常“ Re​​flectionException” - Laravel 5.1.11 Fatal error: Uncaught exception 'ReflectionException' with message 'Class log does not exist' Laravel:致命错误:未捕获反射异常:Class App\Http\Kernel 不存在 - Laravel : Fatal error: Uncaught ReflectionException: Class App\Http\Kernel does not exist Laravel-未捕获的ReflectionException:类日志不存在-配置错误 - Laravel - Uncaught ReflectionException: Class log does not exist - Config error 将我的 laravel api 上传到 000webhost 时出现此错误致命错误:未捕获的反射异常:Class“配置”不存在 - i have this error when uploading my laravel api to 000webhost Fatal error: Uncaught ReflectionException: Class "config" does not exist Laravel错误:未捕获的ReflectionException:类App \\ Http \\ Kernel不存在 - Laravel Error : Uncaught ReflectionException: Class App\Http\Kernel does not exist 未捕获的 ReflectionException:Class 请求在 Jenkins 中不存在 - Uncaught ReflectionException: Class request does not exist in Jenkins 致命错误:未捕获的 ReflectionException:方法 get_site_editor_type 不存在于...第 45 行 - Fatal error: Uncaught ReflectionException: Method get_site_editor_type does not exist in... on line 45
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM