@extends('layouts.app') @section('content')

Teachers Management

Add New Teacher
{{-- ✅ Flash Message --}} @if(session('success'))
{{ session('success') }}
@endif {{-- 🔍 Filters --}}
{{-- 📋 Teachers Table --}}
@forelse($teachers as $teacher) @empty @endforelse
Employee Code Teacher Department Join Date Active Subjects Status Actions
{{ $teacher->employee_code ?? '—' }}
{{ strtoupper(substr($teacher->user->username ?? $teacher->user->name ?? 'U', 0, 1)) }}
{{ $teacher->user->username ?? $teacher->user->name }}
{{ $teacher->user->email ?? 'N/A' }}
@if($teacher->department) {{ $teacher->department }} @else Not Set @endif {{ $teacher->joined_at ? $teacher->joined_at->format('M d, Y') : '—' }} {{ $teacher->classes->where('active', true)->count() }} Classes @if($teacher->user->is_active) Active @else Inactive @endif
{{-- --}}
No teachers found.
{{-- 📑 Pagination --}} @if($teachers->hasPages())
Showing {{ $teachers->firstItem() }} to {{ $teachers->lastItem() }} of {{ $teachers->total() }} entries
@endif
{{-- 🗑 Delete Confirmation Modal --}} @endsection @push('scripts') @endpush