Hey guys!
I'am having troubles with detecting environments with Laravel 5.0.18.
It's just like that Laravel isn't picking up the environment name I'am putting in the APP_KEY.
Example :
I have this in my .env file : APP_ENV=staging
For debug purpose please make test route. In that route just
\Log::info($_SERVER);
and check if there is APP_ENV there as well as what is value there.
If variable is incorrect there aswell then i guess there is problem with booting. Please check your filename if that is correctly '.env'
Is APP_ENV only env variable that doesnt work?
Create test variable there "TEST_ME" for example and see log/ouput.
I am experiencing the same issue. Sharing what I did, hoping it will help. What I did is I remove the bootstrap/cache/config.php. Then all work out smoothly. This happens when you forgot that you cache your configuration. :) You can do the same using php artisan config:clear
If you are using Homestead as your Dev environment, no matter what you put in your your .env file seems to matter as your Homestead.yaml file has a APP_ENV key that seems to override what you use in your environment file.