@section('title') View User @endsection @section('breadcrumbs') {{ Breadcrumbs::render('user-management.users.show', $user) }} @endsection

User Details: {{ $user->first_name }} {{ $user->last_name }}

Personal Information

@if($user->profile_pic) Profile Picture @else
{{ substr($user->first_name, 0, 1) . substr($user->last_name, 0, 1) }}
@endif

Profile Picture

Province {{ $user->province->name ?? 'Not specified' }}
Full Name {{ $user->first_name }} {{ $user->last_name }}
Gender {{ ucfirst($user->gender) }}
Date of Birth {{ \Carbon\Carbon::parse($user->date_of_birth)->format('d M Y') }}
Phone Number {{ $user->phone_number }}
Email Address {{ $user->email }}
Occupation {{ $user->occupation }}
Marital Status {{ ucfirst($user->marital_status) }}

Residential Address

Address {{ $user->address ?? 'Not specified' }}
Suburb {{ $user->address_suburb ?? 'Not specified' }}
City {{ $user->address_city ?? 'Not specified' }}
State {{ $user->address_state ?? 'Not specified' }}
Postal Code {{ $user->address_postal_code ?? 'Not specified' }}
Country {{ $user->address_country ?? 'Not specified' }}
@if($user->marital_status === 'married')

Spouse Information

Full Name {{ $user->spouse_first_name }} {{ $user->spouse_last_name }}
Gender {{ ucfirst($user->spouse_gender) }}
Date of Birth {{ $user->spouse_date_of_birth ? \Carbon\Carbon::parse($user->spouse_date_of_birth)->format('d M Y') : 'Not specified' }}
Occupation {{ $user->spouse_occupation ?? 'Not specified' }}
@endif @php $childrenOver18 = $user->childrenOver18; $agedUpChildren = $user->childrenUnder18->filter(function ($child) { return \Carbon\Carbon::parse($child->date_of_birth)->age >= 18; }); $allOver18 = $childrenOver18->merge($agedUpChildren); @endphp @if($allOver18->count() > 0)

Childrens Over 18 Years ({{ $allOver18->count() }})

@foreach($allOver18 as $child) @endforeach
Gender Full Name Date of Birth Contact Info Residential Address Work/Study Details
{{ ucfirst($child->gender) }} {{ $child->first_name }} {{ $child->last_name }} {{ \Carbon\Carbon::parse($child->date_of_birth)->format('d M Y') }} @if($child->phone_number)
Phone: {{ $child->phone_number }}
@endif @if($child->email)
Email: {{ $child->email }}
@endif
{{ $child->residential_address ?? 'Not specified' }} {{ ucfirst($child->work_study ?? $child->school_college ?? '-') }} {{ $child->details }}
@endif @php $actualUnder18 = $user->childrenUnder18->filter(function ($child) { return \Carbon\Carbon::parse($child->date_of_birth)->age < 18; }); @endphp @if($actualUnder18->count() > 0)

Children Under 18 Years Old ({{ $actualUnder18->count() }})

{{-- --}} @foreach($actualUnder18 as $child) {{-- --}} @endforeach
Gender Full Name Date of Birth Contact InfoResidential AddressSchool/College Details
{{ ucfirst($child->gender) }} {{ $child->first_name }} {{ $child->last_name }} {{ \Carbon\Carbon::parse($child->date_of_birth)->format('d M Y') }} @if($child->phone_number)
Phone: {{ $child->phone_number }}
@endif @if($child->email)
Email: {{ $child->email }}
@endif
{{ $child->residential_address ?? 'Not specified' }}{{ ucfirst($child->school_college) }} {{ $child->details }}
@endif