且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Laravel Blade循环中未定义的变量$ loop

更新时间:2022-05-15 02:46:16

升级到Laravel 5.3后,您需要重新保存视图以使$ loop变量生效,因为您可能正在查看缓存版本.我遇到了同样的问题,升级了,仍然有问题,重新保存了视图(修改后),然后$ loop起作用了.

After upgrading to Laravel 5.3, you'll need to re-save your views in order to see the $loop variable take effect as you may be viewing the cached versions. I had the same issue, upgraded, still had the issue, re-saved the view (after modifying) and then $loop worked.