I am working on a web application using Laravel 8. Whenever I make any changes, they do not reflect immediately. I have to clear the views
php artisan view:clear
and cache
php artisan cache:clear
and also force hard refresh by simultaneously pressing Command Control R severally before the changes effect. I have tried disabling cache on my browser and even checking the Update on reload under the Application tab in Google Chrome. I have also turned set CACHE_DRIVER=none
in .env file. I would like to know whether there is a work around my issue because it's interfering with my effectiveness.
CodePudding user response:
Put APP_ENV=local
in your .env file.
Normally If the compiled view either does not exist, or the uncompiled view has been modified, Laravel will recompile the view. But in production environment, evaluating compiled file modification date will be omitted.
And by the way, It doesn't have anything to do with cache driver. Compiled files will always be cached in local filesystem.
CodePudding user response:
in your .env file set
CACHE_DRIVER=none