Username: {{ $agent->username ?? 'N/A' }}
First Name: {{ $agent->first_name ?? 'N/A' }}
Last Name: {{ $agent->last_name ?? 'N/A' }}
Company Name: {{ isset($agent->agencies['name']) ? $agent->agencies['name'] : 'N/A' }}
Email Address: {{ $agent->email ?? 'N/A' }}
Secondary Email: {{ $agent->secondary_email ?? 'N/A' }}
Phone:
@php
$phone = $agent->phone ?? '';
if (preg_match('/^(\d{10})$/', $phone)) {
$formattedPhone = '(' . substr($phone, 0, 3) . ') ' . substr($phone, 3, 3) . '-' . substr($phone, 6);
} else {
$formattedPhone = $phone ?: 'N/A';
}
@endphp
{{ $formattedPhone }}
Fax: {{ $agent->fax ?? 'N/A' }}
Birth date:
@if($agent->dob)
{{ \Carbon\Carbon::parse($agent->dob)->format('m-d-Y') }}
@else
N/A
@endif
Address: {{ isset($agent->addresses['address_line1']) ? $agent->addresses['address_line1'] : 'N/A' }}
State: {{ $agent->addresses['state'] ?? 'N/A' }}
Zip: {{ $agent->addresses['zip'] ?? 'N/A' }}
Notification Preference: {{ $agent->notification_preference ?? 'N/A' }}
Sponsor:
@if($agent->sponsors && $agent->sponsors->count() > 0)
@foreach($agent->sponsors as $sponsor)
{{ $sponsor->first_name }} {{ $sponsor->last_name }}
@endforeach
@else
N/A
@endif
Note: {{ $agent->note ?? 'N/A' }}
Status:
@if($agent->status == 1)
Active
@else
Inactive
@endif