Laravel 5.2 not reading env file

前端 未结 26 2315
时光说笑
时光说笑 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:27

    Also additional to what @andrewtweber suggested make sure that you don't have spaces between the KEY= and the value unless it is between quotes

    .env file e.g.:

    ...
    SITE_NAME= My website
    MAIL_PORT= 587
    MAIL_FROM_NAME= websitename
    ...
    

    to:

    ...
    SITE_NAME="My website"
    MAIL_PORT=587
    MAIL_FROM_NAME=websitename
    ...
    

提交回复
热议问题