@props([ 'name' => 'items', 'title' => 'Items', 'columns' => [], 'model' => null, 'initEmpty' => false, 'hideFirstTrash' => false, 'notAllowToAdd' => false, 'deleteOld' => true, ])
@php $items = old($name, $model ? $model->{$name} : []); if(empty($items) && $initEmpty) $items = [[]]; @endphp @foreach($items as $index => $item)
@foreach($columns as $column)
@if($column['type'] === 'image') @else @foreach($column['translations'] ?? [config('app.locale')] as $lang) @endforeach @endif
@endforeach
@if(!($hideFirstTrash && $loop->first) || $loop->count > 1) @endif
@endforeach
@if(!$notAllowToAdd)
@endif
@once @endonce