{{-- Teacher Statistics Header with Per Page Selector --}}
Displaying teachers @if(isset($teachers) && $teachers instanceof \Illuminate\Pagination\LengthAwarePaginator) from {{ $teachers->firstItem() ?? 1 }} to {{ $teachers->lastItem() ?? $teachers->count() }} @endif out of total {{ $totalTeachers ?? 0 }} | Male: {{ $maleCount ?? 0 }} | Female: {{ $femaleCount ?? 0 }}
{{-- Teacher Cards --}}
@forelse($teachers as $value)
{{-- Card Body: Image + Info --}}
{{-- Profile Photo --}}
Teacher Photo
{{-- Info --}}
{{ $value->nick_name ?? 'N/A' }}
@if($value->status === 0 || $value->status === '0') Inactive @else Active @endif

Primary ID: {{ $value->primary_id ?? '--' }}

Secondary ID: {{ $value->teacher_code ?? '--' }}

{{--

Age: {{ $value->dob ? \Carbon\Carbon::parse($value->dob)->age : '--' }} years

Reg. Date: {{ $value->date_of_joining ? \Carbon\Carbon::parse($value->date_of_joining)->format('d-m-Y') : '--' }}

--}}

Primary Subject: {{ $value->primary_subject ?? '--' }}

Campus: {{ $value->campus->name ?? '--' }}

Category: {{ $value->employeeCategory->name ?? '--' }}

Shift: {{ $value->shift->name ?? '--' }}

{{-- Button Section --}}
@empty
No Teachers Found
@endforelse
{{-- Pagination --}} @if(isset($teachers) && $teachers->hasPages())
Showing {{ $teachers->firstItem() }} to {{ $teachers->lastItem() }} of {{ $teachers->total() }} teachers
{{ $teachers->withQueryString()->links('pagination::bootstrap-5') }}
@endif