Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

ako_salman's avatar

Laravel does not clear cache completely

i'm using Laravel-5.4. non of below statements clear css cache of Laravel project

php artisan cache:clear
php artisan view:clear
php artisan config:cache
...

and Laravel loads old css files always. i had not this problem before. how can i fix it?

0 likes
5 replies
Screenbeetle's avatar

Morning.

Do you mean you want to view changes to your css when you view the app in your browser? If so then this is a browser cache issue not Laravel.

A quick option to clear your local browser cache is pressing CTRL & R

A better option for your project is to use versioning with Laravel Mix (L 5.4). https://laravel.com/docs/5.4/mix#versioning-and-cache-busting

This combines all your css into one file with then creates a different name each time. This means browsers will always load your css if there are any changes:

1 like
Screenbeetle's avatar
Level 15

Can I just check - are you saying:

  1. that changes to the css file are not showing in your browser?
  2. or that changes to your sass files are not compiling into a css file?

If you are talking about number 1 then - as a test - have you tried changing the name of your css file? This will guarantee that your browser reloads the css file

1 like

Please or to participate in this conversation.