{{-- Line-item editor. Params: $id, $cols ([f,l,t,o,req,role,ro,w]), $rows --}}
@foreach($cols as $c)@endforeach @php $ri = 0; @endphp @foreach((count($rows ?? []) ? $rows : [null]) as $row) @foreach($cols as $c) @php $fname = "lines[$ri][{$c['f']}]"; $val = $row ? data_get($row, $c['f']) : null; $role = !empty($c['role']) ? 'data-'.$c['role'] : ''; @endphp @endforeach @php $ri++; @endphp @endforeach
{{ $c['l'] }}
@if(($c['t'] ?? 'text')==='select') @elseif(($c['t'] ?? '')==='static'){{ $c['v'] ?? $val }} @elseif(($c['t'] ?? '')==='check') @else @endif