Reputation: 2977
I discovered that I can't change something in the .env file and have Laravel pick it in next run. For example I changed
APP_ENV=production
to
APP_ENV=local
And upon running
artisan migrate
I still get asked if I am sure I want to run migration in production environment. Is there a way to get around this and not have to clear cache every time .env file is updated?
Upvotes: 4
Views: 2651
Reputation: 1
You need to run route:clear
, config:clear
, and view:clear
. After composer dump-autoload
.
Upvotes: 0
Reputation: 7094
You can use this one command to clear all caches in Laravel:
php artisan optimize:clear
It would clear all the caches:
Upvotes: 0