如何清除Laravel中的缓存? [英] How to clear cache in Laravel?
本文介绍了如何清除Laravel中的缓存?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我已经在master-blade.php中添加了css文件
I have added css file in master-blade.php like this
<link href="{{ url(mix('css/app.css')) }}" rel="stylesheet">
在视图中,css文件的路径如下所示.
In view the path of css file looks like this.
<link href="******/css/app.css?id=43965480df345823e8e0" rel="stylesheet">
现在我正在更改app.css文件中的css,但它不能反映在网页上.问题是由于css文件路径中的id.如何在CSS文件中进行更改.
Now i am changing the css in app.css file but it does not reflect on web page.The problem is due to the id in path of css file. How can i do the changes in css file.
推荐答案
您需要在开发服务器上运行 npm run dev
,在生产服务器上运行 npm run prod
,以生成/更新JS和CSS.
You need to run npm run dev
on your development server and npm run prod
on your production server, to generate/update the JS and CSS.
如果要清除所有存储在/storage/cache中的缓存:
If you want clear all cache, stored in /storage/cache:
php artisan cache:clear
并清除路由缓存:
php artisan route:clear
要清除视图缓存:
php artisan view:clear
这篇关于如何清除Laravel中的缓存?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文