Framework: Can not get data from `.env`.

Created on 20 Jun 2018  路  3Comments  路  Source: laravel/framework

  • Laravel Version: 5.6.24 and 5.6.26 too.
  • PHP Version: 7.2.6

Description:

So, You will got this problem after you run command php artisan config:cache

And try to get data from .env. It always got null.

But after you run php artisan config:clear.

You will get data from .env.

Most helpful comment

It's intended. You should use env ONLY in config files. I bet even docs says that somewhere.

All 3 comments

It's intended. You should use env ONLY in config files. I bet even docs says that somewhere.

@decadence Ahhh!! Ok got it!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ghost picture ghost  路  3Comments

SachinAgarwal1337 picture SachinAgarwal1337  路  3Comments

JamborJan picture JamborJan  路  3Comments

fideloper picture fideloper  路  3Comments

kerbylav picture kerbylav  路  3Comments