Laravel 8 config:cache 允许发送电子邮件,但在 config:cache 之后无法读取环境变量
希望你们一切都好。当我运行命令
php artisan config:cache
电子邮件正在发送但我无法读取 env( 'DB_HOST')
变量。
同样,当我这次运行时:
php artisan config:clear
email is not send, now I can read env('DB_HOST ')
变量。
我不明白什么是问题。
hope you are all fine. I am facing an issue when I am running command
php artisan config:cache
email is sending but I can't read env('DB_HOST')
variables.
Similarly when I run then this time:
php artisan config:clear
email is not sending, now I can read env('DB_HOST')
variables.
I don't understand what is issue.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
阅读此https://laravel.com/docs/8.x/configuration#配置缓存
您必须使用相应的配置。在你的情况下
Read this https://laravel.com/docs/8.x/configuration#configuration-caching
You must be use correspond config. IN your case