@extends('layouts.app') @section('title', 'Mark Attendance') @section('page-title', 'Mark Attendance') @section('content')
@if(session('success'))
{{ session('success') }}
@endif {{-- Filter --}}
@if($classes->isEmpty())

No classes assigned to you yet.

Contact the admin to assign subjects and classes.

@endif @if($students->isNotEmpty())
@csrf

{{ $classes->firstWhere('id', $selectedClass)?->full_name }} — {{ \Carbon\Carbon::parse($date)->format('D, d M Y') }}

{{ $students->count() }} students
@foreach($students as $i => $student) @php $existing = $attendances->get($student->id); @endphp @endforeach
# Student Status Remarks
{{ $i + 1 }}

{{ $student->name }}

{{ $student->studentProfile?->roll_number ? 'Roll: '.$student->studentProfile->roll_number : '' }}

@foreach(['present' => ['✅','Present','green'], 'absent' => ['❌','Absent','red'], 'late' => ['⏰','Late','yellow'], 'excused' => ['📋','Excused','blue']] as $val => $meta) @endforeach
@elseif($selectedClass)

No students found in this class.

@endif
@endsection