@extends('layouts.app') @php $editing = isset($customer); $contact = $editing ? $customer->contact : null; $address = $editing ? $customer->address : null; $identity = fn (string $type) => $editing ? $customer->identityRecords->where('document_type', $type)->where('is_current', true)->first() : null; $passport = $identity('passport'); $eid = $identity('emirates_id'); $uid = $identity('uid'); $visa = $identity('residence_visa'); @endphp @section('title', $editing ? 'Edit Customer' : 'New Customer') @section('content')
Customer master
Identity, contact, visa, corporate link, ownership and duplicate controls in one record.