@csrf @php // Contact details keyed by customer id, so picking a customer auto-fills the form. $customerMap = $customers->mapWithKeys(fn ($c) => [$c->id => [ 'name' => $c->name, 'phone' => $c->phone, 'email' => $c->email, ]]); @endphp {{-- Section: linked customer + contact details --}}