Laravel Blade 视图未显示对它们所做的更改 [英] Laravel Blade views not showing the changes made to them

查看:19
本文介绍了Laravel Blade 视图未显示对它们所做的更改的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

系统详细信息:在 64 位 Windows 中使用 WAMP2.5
MYSQL:5.6.17
PHP:5.5.12
Apache:2.4.9
我通过 composer 安装 Laravel.一切都很好,因为最近我的所有视图都不再显示对它们所做的任何更改.仅使用 Blade 模板的视图会发生这种情况.

我已经正确地创建了刀片文件并用 filename.blade.php 命名它们.我的观点 文件结构 -
查看次数
       -布局
                  defaults.blade.php
       show.blade.php
       login.blade.php
       

defaults.blade.php

<!DOCTYPE html><html><头></头><身体>

<导航></导航>@yield('内容')</div>@yield('footerscripts')</身体></html>

show.blade.php

@extends('layouts.defaults')@section('内容')--- 一些内容 ---@停止@section('脚注')--- js脚本---@停止

相同的格式运行良好,但突然开始出现奇怪的行为.即使刷新多次后视图也没有改变,一旦我尝试删除视图页面内的所有内容,它仍然显示在浏览器中.
有类似的问题,但很多人没有接受答案,而且有一些评级的问题对我不起作用.我还尝试重新安装全新的 WAMP 副本,但没有帮助.它仅在我更改其名称时才有效,但如果我将其更改回原来的名称,它会再次开始显示旧版本.只有刀片模板才会发生.

解决方案

如果你使用 PhpStorm:

  1. 打开菜单文件→设置

  2. 转到部署→选项部分

  3. 然后取消选中 Preserve files timestamps 选项

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:

  1. open menu File → Settings

  2. go to Deployment → Options section

  3. then uncheck Preserve files timestamps option

这篇关于Laravel Blade 视图未显示对它们所做的更改的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆