{{-- Render a run of Studio fields, pairing the col=2 ones into a two-up grid. Params: $fields (array of field defs, each an array _field understands + optional 'col'), $noFill. --}} @php $noFill = $noFill ?? ''; @endphp @foreach ($fields as $f) @php $i = $loop->index; $col = $f['col'] ?? 1; $prevCol = $fields[$i - 1]['col'] ?? 1; $nextCol = $fields[$i + 1]['col'] ?? 1; $isFirst = $loop->first || $prevCol !== $col; $isLast = $loop->last || $nextCol !== $col; @endphp @if ($col === 2 && $isFirst)
@endif @include('livewire.admin.landing._field', $f + ['noFill' => $noFill]) @if ($col === 2 && $isLast)
@endif @endforeach