APP_ENV is set to "homestead" but app()->environment() says "local"

On my .env file I can read:

APP_ENV=homestead

But if I run this with Psy Shell:

dd(app()->environment());

It displays : “homestead” (alright).

But if I run the same command from a controller method, It displays: “local”

Why?


Source: laravel

Leave a Reply