0

我被困住了:

我正在构建一个动态表单构建器:

我有这样的输入类型(截图):

  • 项目清单

  • master_pages

    • 字段
      • date.blade.php
      • 日期时间.blade.php
      • 电子邮件.blade.php
      • field.blade.php
      • image.blade.php
      • 输入.blade.php
      • number.blade.php
      • textarea.blade.php
      • 所见即所得.blade.php

所有字段刀片模板都扩展到 field.blade.php

当我像这样动态地包含它们时(屏幕截图):

<div class="bg-light p-3 fields">
    @if(isset($section->fields))
        @foreach($section->fields as $id => $field)
            @include('admin.master_pages.fields.' . $field['type'], ['id' => $id, 'type' => $field['type'], 'field' => $field])
        @endforeach
    @endif
</div>

Laravel 刀片引擎为每种输入类型都包含相同的文件。像缓存包括。

谁能帮我?

谢谢你。

4

0 回答 0