I am trying to deploy my application to production, which works well in local mode.
Thing when trying:
dd(getenv('APP_ENV'));
it returns false
but when i plug in ssh and type:
php artisan env
I get
production
Any idea why it stopped working ???
To record while creating my deployment script, run 3 commands:
composer dump-autoload -o
php artisan route:cache
php artisan config:cache
I mention this because it is probably the only software config that is different.
EDIT: I believe the problematic command is:
php artisan config:cache
If if do:
php artisan config:clear
the problem is resolved.
Tx!
source
share