Reputation: 3444
In Laravel 5.5 when I do a simple :
$env = env('APP_ENV');
Log::info('environnement : ' . $env);
The log is always :
[2018-08-23 11:55:34] local.INFO: environnement :
And my .env file is :
APP_NAME=Laravel
APP_ENV=local
APP_KEY=base64:+WXI)---hidden-----IXBfB2jTYAqo=
APP_DEBUG=true
APP_LOG_LEVEL=debug
APP_URL=http://localhost:3000/
I am waiting for a response : "local". And don't understand why I receive null.
Upvotes: 0
Views: 225
Reputation: 1720
Did you try to clear cache?
php artisan config:clear
If you run your web using command php artisan serve
, please close then run again.
Upvotes: 4