简体   繁体   中英

changes are not reflected in laravel views

I am creating an app in Laravel 5.1 and it was working fine before. Any changes I made in the views files were reflected in the browser. Now for the last 3 days no change is reflected in the browser.

These are my view files:

master.blade.php

<!doctype html>
<html>
<head>
<!-- my head section goes here -->
<!-- my css and js goes here -->
<title></title>

{!!Html::style('css/bootstrap.min.css')!!}
{!!Html::style('css/main.css')!!}


{!!Html::script('js/jquery-2.1.1.min.js')!!}
{!!Html::script('js/bootstrap.min.js')!!}
{!!Html::script('js/jquery.validate.min.js')!!}
{!!Html::script('js/main.js')!!}

</head>
<body>
<header>
<div class="container">@include('layout.header')</div>
</header>
<div class="container">
    <div class="contents"> @yield('content') </div>
</div>
<footer>
    <div class="container">@include('layout.footer')</div>
</footer>
</body>
</html>

I am changing the name of the css file to app.css but when I run the app it shows main.css in source.

I looked for cache in storage/framework it shows the view file with old code 'main.css' I deleted all the cache files, I also tried php artisan cache:clear and php artisan view:clear but when I run the app it shows old html in source code and when I checked the cache files it regenerates cache file with old view code. I tried different change but nothing is reflected in the cache or browser.

Try the following commands, it might help

php artisan cache:clear

php artisan config:clear

This commands worked for me!

php artisan view:clear

Thanks to this link :D ! Link

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM