Doctor List Total Doctors: {{ $totalDoctors }}

@forelse ($users as $user) {{-- Doctor Column with Avatar --}} {{-- Specialization --}} @php $spec = $user->doctor?->specialization ?? null; $arr = []; if (is_array($spec)) { $arr = $spec; } elseif (is_string($spec)) { // कोशिश करो JSON decode करने की $decoded = json_decode($spec, true); if (json_last_error() === JSON_ERROR_NONE && is_array($decoded)) { $arr = $decoded; } else { // नहीं तो comma-separated मान कर split करो $arr = array_filter(array_map('trim', explode(',', $spec))); } } @endphp {{-- License Number --}} {{-- Primary Clinic --}} {{-- Status Badge --}} {{-- Actions --}} @empty @endforelse
Doctor Specialization License Number Primary Clinic Status
{{ count($arr) ? implode(',', $arr) : 'N/A' }} {{ $user->doctor?->license_number ?? 'N/A' }} @php $primaryClinic = $user->clinics->where('pivot.is_primary', true)->first(); @endphp {{ $primaryClinic ? $primaryClinic->name : 'N/A' }} @if ($user->status === 'active') Active @else Inactive @endif
No doctors found.
@push('scripts') @endpush