I try to find out why my env()
helper always returns null
. This causes trouble especially in app.php
file, where are env()
helpers widely used by default. Perhaps any mysterious server setting?
My env file:
APP_ENV=production
APP_KEY=base64:mymagickey=
APP_DEBUG=false
APP_LOG_LEVEL=info
APP_URL=http://www.example.com
etc...
EDIT - I tried following:
php artisan cache:clear
php artisan view:clear
php artisan config:cache
and ofcourse, i am using env
helper like this: env('APP_ENV')
But still no success. The wierd part is, that $_ENV
php variable contains every single variable from .env
file.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…