Laravel 5.2 not reading env file

前端 未结 26 1991
时光说笑
时光说笑 2020-11-28 20:52

After upgrading to Laravel 5.2, none of my .env file values are being read. I followed the upgrade instructions; none of my config files were changed except aut

相关标签:
26条回答
  • 2020-11-28 21:43

    The simplicity is the power:

    php artisan config:cache
    

    You will receive:

    Configuration cache cleared!

    Configuration cached successfully!

    0 讨论(0)
  • 2020-11-28 21:43

    I face the same problem much time during larval development. some times env stop working and not return any value. that reason may be different that depends on your situation. but in my case a few days ago I just run

     PHP artisan::config:clear
    

    so be careful use of this command. because it will wipe all config data form its cache. so after that, it will not return any value. So in this situation, you need to use this first if you have run PHP artisan config:: clear command.

    php artisan config:cache  // it will cache all data 
    php artisan config:clear
    Configuration cache cleared!
    
    0 讨论(0)
提交回复
热议问题