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

nkeena picture nkeena  路  75Comments

itsgoingd picture itsgoingd  路  81Comments

mnpenner picture mnpenner  路  72Comments

GrahamCampbell picture GrahamCampbell  路  139Comments

mstnorris picture mstnorris  路  87Comments