Laravel Blade views not showing the changes made to them

本小妞迷上赌 提交于 2019-11-29 02:32:10

If you use PHP Storm:

  1. open menu File → Settings

  2. go to Deployment → Options section

  3. then uncheck option Preserve files timestamps

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

  1. In your cmd(command prompt) or terminal type and press enter... php artisan view:clear

For this to work, your terminal should be pointed to your root directory of your laravel installation/folder

  1. Or delete files in the folder storage/framework/views

In order to avoid the parsing of Blade files on each reload, Laravel is designed to caches views after Blade is parsed, to avoid re-parsing the blades on each reload.

  1. Or make sure you are editing the right view, in the right Laravel Installation.
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!