2018-01-24 10:03
采纳率: 100%
浏览 542

如何在Laravel中清除缓存? [重复]

This question already has an answer here:

I have added css file in master-blade.php like this

   <link href="{{ url(mix('css/app.css')) }}" rel="stylesheet">

In view the path of css file looks like this.

    <link href="******/css/app.css?id=43965480df345823e8e0" rel="stylesheet">

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.


图片转代码服务由CSDN问答提供 功能建议

此问题已经存在 这里有一个答案:

  • Laravel 5如何使用composer.json清除缓存 3个答案\ r

    我在master-blade.php中添加了css文件 这个

     &lt; link href =“{{url(mix('css / app.css'))}}”rel =“stylesheet”&gt; 


     &lt; link href =“******  /css/app.css?id=43965480df345823e8e0“rel =”stylesheet“&gt; 

    现在我正在更改app.css文件中的css但它没有 反映在网页上。问题是由于css文件路径中的id。 如何在css文件中进行更改。

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 邀请回答

3条回答 默认 最新

  • dpyln64620 2018-01-24 10:07

    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.

    If you want clear all cache, stored in /storage/cache:

    php artisan cache:clear

    And to clear route cache:

    php artisan route:clear

    To clear view cache:

    php artisan view:clear
    点赞 评论
  • dqy012345 2018-01-24 10:04

    try artisan command-

    php artisan cache:clear
    php artisan view:clear
    点赞 评论
  • doushi9729 2018-01-24 10:05

    If you want to clear view cache, do this:

    php artisan view:clear

    You also can clear all Laravel cache.

    点赞 评论

相关推荐 更多相似问题