如何修复Laravel Nova中的`Undefined property:Illuminate \ View \ Factory :: $ iteration`错误

时间:2019-01-16 03:03:50

标签: php laravel laravel-blade laravel-nova

只需打开最近的项目,“ Boom”错误就不会出现。

  

未定义属性:Illuminate \ View \ Factory :: $ iteration(视图:/mnt/d/web/etapas-backend/resources/views/components/landing-pages/screenshots.blade.php)(视图:/ mnt /d/web/etapas-backend/resources/views/components/landing-pages/screenshots.blade.php)

这是我机器上的SS

http://prntscr.com/m7r3h6

2 个答案:

答案 0 :(得分:0)

错误消息几乎相同,但在Laravel中 Facade \ Ignition \ Exceptions \ ViewException 未定义的属性:Illuminate \ View \ Factory :: $ startSection(视图:/home/steven/Documents/sphereConsultancy/sandbox/myfirstubuntu/resources/views/welcome.blade.php)

这是我在layout.blade.php中的代码

@extends('layout')
@section
<h1>My First Website</h1>
@endsection

正确的代码-注意添加的@section('content') 这是我在layout.blade.php

中的代码
@extends('layout')
@section('content')
<h1>My First Website</h1>
@endsection

答案 1 :(得分:0)

这个错误发生在你启动了@section但没有关闭它时 添加 @结束部分