@extends('layouts.app') @section('title', 'Manage Doctors') @section('content')

Manage Doctors

@if(session('success'))
{{ session('success') }}
@endif
@php $preserveParams = request()->only(['search', 'sort_by', 'sort_order']); @endphp All ({{ $totalCount }}) Pending ({{ $pendingCount }}) Active ({{ $activeCount }}) Inactive ({{ $inactiveCount }})
@if(request('search')) @endif
@if(request()->hasAny(['search', 'status', 'sort_by', 'sort_order'])) @endif
@if(request()->hasAny(['search', 'status', 'sort_by', 'sort_order']))
Showing {{ $doctors->count() }} doctor(s) @if(request('search')) matching "{{ request('search') }}" @endif
@endif
@php $currentSort = request('sort_by', 'created_at'); $currentOrder = request('sort_order', 'desc'); function buildSortUrl($sortBy, $currentSort, $currentOrder) { $params = request()->except(['sort_by', 'sort_order']); $params['sort_by'] = $sortBy; $params['sort_order'] = ($currentSort === $sortBy && $currentOrder === 'asc') ? 'desc' : 'asc'; return route('admin.doctors', $params); } @endphp @forelse($doctors as $doctor) @empty @endforelse
Name @if($currentSort === 'name') @else @endif Practice Number @if($currentSort === 'practice_number') @else @endif Status @if($currentSort === 'status') @else @endif Actions
@if($doctor->profile_picture_path) @else @endif {{ $doctor->full_name }}
{{ $doctor->practice_number }} @if($doctor->is_verified && $doctor->is_active) Active @elseif($doctor->is_verified && !$doctor->is_active) Inactive @else Pending @endif
@if(!$doctor->is_verified)
@csrf
@endif
@csrf
@csrf @method('DELETE')

No doctors found matching your criteria.

@if(request()->hasAny(['search', 'status'])) Clear filters @endif
@endsection