@php $items = old('items', $prescription?->items?->toArray() ?? [['medication_name' => '', 'dosage' => '', 'frequency' => '', 'duration_days' => '', 'instructions' => '']]); @endphp
@foreach ($items as $i => $item)
@endforeach