Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Laravel 5 is loading old css

I am editing my css located in resources\assets\sass\app.css then I run gulp watch but it seems that laravel is ignoring the changes I made in my css.

I tried editing the css directly in public\css\app.css but still when I view my page in the browser the style is not working.

For example, my page's background color is white but I changed it to red, the background of my page in the browser is still white.

When I tried the view source in the browser and clicked on the filename in the , the background-color: #fff;

Hope you get my point. Do you have any idea about this?

like image 489
RU3 Avatar asked Dec 15 '16 09:12

RU3


People also ask

How do you force the browser to reload cached .JS .CSS files to reflect the latest changes to those files?

It works, all the time, for everyone. But, if you're not using it, and you just need to reload that one CSS or JS file occasionally in your own browser... just open it in its own tab and hit SHIFT-reload (or CTRL-F5)!

Can I use CSS in laravel?

Laravel Mix provides a clean, expressive API over compiling SASS or Less, which are extensions of plain CSS that add variables, mixins, and other powerful features that make working with CSS much more enjoyable.

Where should I put my CSS in laravel?

Search for Public folder in Laravel. Create css folder (that contains stylesheet files of your project), javascript and Images folder (contains images that you will use in your project).


1 Answers

You should clear all cache. First, clear view cache:

php artisan view:clear
php artisan cache:clear

Then clear browser cache and reload the page.

like image 99
Alexey Mezenin Avatar answered Oct 09 '22 19:10

Alexey Mezenin