Laravel不会在env中读取配置,因此env('APP_KEY')始终返回NULL。我也用:
php artisan config:clear
和
php artisan config:cache
但它没有任何效果。你有解决方案吗?第一次,我可以使用上面的2命令修复,但现在我不能。
答案 0 :(得分:2)
Try:
php artisan config:clear
then:
php artisan cache:clear
and make sure that you have permissions to run these commands, or you can simply run them with sudo
.