@if ($viewMode == 'table')
@forelse($patients as $k=> $patient) @empty @endforelse
# Name @if ($sortField === 'name') {{ $sortDirection === 'asc' ? '↑' : '↓' }} @else ⇅ @endif Phone @if ($sortField === 'phone') {{ $sortDirection === 'asc' ? '↑' : '↓' }} @else ⇅ @endif Status @if ($sortField === 'status') {{ $sortDirection === 'asc' ? '↑' : '↓' }} @else ⇅ @endif
Action
{{ $patients->firstItem() + $k }} {{ $patient->name }} {{ $patient->phone }} {{ $patient->status }}
@if(empty(array_intersect($patient->visits->pluck('clinic_id')->toArray(), auth('client')->user()->clinicAssistant->pluck('id')->toArray()))) @endif
No Patient found.
{{ $patients->links() }}
@endif @if ($viewMode == 'cards')
@foreach($patients as $patient)
{{ $patient->name }}

Phone : {{ $patient->phone }}

{{--

{{ $patient->status }}

--}}
@if(empty(array_intersect($patient->visits->pluck('clinic_id')->toArray(), auth('client')->user()->clinicAssistant->pluck('id')->toArray()))) @endif
@endforeach
@endif