@extends('layouts.teacher.app') @section('content')
@include('errors')
@include('layouts.messages') {{-- Display error message if $att is null --}} @if(session('error'))
{{ session('error') }}
@endif
@include('layouts.messages')
@csrf

{{ $kelas }} - Daily Student Attendance

School
: {{ $teacher->mrsm_name}}
Teacher
: {{ $teacher->name}}
Class
: {{ $kelas }}
{{--
Total Student
: {{ $classsession->total_murid}}
--}} {{--
Session
: {{ $classsession->hari }} ( {{ \Carbon\Carbon::parse($classsession->mula_kelas)->format('h:i A') }} - {{ \Carbon\Carbon::parse($classsession->tamat_kelas)->format('h:i A') }})
--}}
@php $sortedDates = collect($attendanceCounts)->keys()->sort()->reverse(); @endphp @foreach ($sortedDates as $date) @endforeach @forelse ($class_member as $student) @foreach ($sortedDates as $date) @endforeach @empty @endforelse
No. Student ID Student Name Date
{{ \Carbon\Carbon::parse($date)->format('d/m') }}
{{ $loop->iteration }}. {{ $student->student_id }} {{ $student->student_name }} @if (in_array($student->student_id, $studentsNotInAttendanceByDate[$date]->pluck('student_id')->toArray())) ❌ @else ✔ @endif
No attendance record found for this class.
@endsection