System Details : Using WAMP2.5 in Windows 64 bit
MYSQL:5.6.17
PHP:5.5.12
Apache :2.4.9
I installed laravel via composer installation . It was all fine since recently all my views stopped showing any changes made to them . This is happening to views which use Blade template only.
I have created the blade files correctly and named them with filename.blade.php
.
My view File Structure - views
-layouts
defaults.blade.php
show.blade.php
login.blade.php
defaults.blade.php
<!DOCTYPE html>
<html>
<head></head>
<body>
<div>
<nav></nav>
@yield('content')
</div>
@yield('footerscripts')
</body>
</html>
show.blade.php
@extends('layouts.defaults')
@section('content')
--- SOME CONTENT ---
@stop
@section('footerscripts')
--- js scripts ---
@stop
The same format was working perfectly but suddenly started acting strangely.Even after refreshing many times the view doesn't change,Once i tried deleting everything inside the view page still it showed up in the browser.
There are similar question but many didn't have accepted answer and the one with some ratings didn't worked for me . I also tried re-installing fresh new WAMP copy but no Help.It only works if i change its name but if i change it back to the original one it again starts showing the old version of it.
Only happens with blade templating.
If you use PhpStorm:
open menu File → Settings
go to Deployment → Options
section
then uncheck Preserve files timestamps
option
I'm not sure of the specifics, but this is related to how filemtime()
is implemented in windows (possibly related bug here).
Illuminate\View\Compilers\BladeCompiler
(well, it's parent class, Compiler
) checks to see if a file has changed since last compilation by checking it's mtime, through Illuminate\Filesystem\Filesystem
which calls calls filemtime()
(see L179-188). Evidently this is failing to report properly on your system.
First, ensure that the app/storage/views
directory has read, write and delete permissions. If this doesn't help, the simplest solution would be to clear the app/storage/views/
directory whenever making a change.
I had this same issue , reason was I am doing uploads remote, but the time on my computer was different than what that was on my server
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With