@php $boundLines = old('lines'); if ($boundLines === null) { $boundLines = $priceList->items; } @endphp
@foreach($boundLines as $idx => $line)
@php
$itemId = is_object($line) ? $line->item_id : ($line['item_id'] ?? null);
$price = is_object($line) ? $line->price : ($line['price'] ?? 0);
$others = collect($boundLines)->filter(fn($l, $i) => $i != $idx)->map(fn($l) => is_object($l) ? $l->item_id : ($l['item_id'] ?? null))->filter()->values()->all();
@endphp
|
|
|
|
@endforeach