@php $p = $appointment->Patient; $age = $p?->dob ? \Carbon\Carbon::parse($p->dob)->age : null; @endphp