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

Daily Attendance

@include('errors')
Daily Student Attendance Record - {{$kelas}}

School : {{ $teacher->mrsm_name }}

Class : {{ $kelas }}

@php $sortedDates = collect($attendanceCounts)->keys()->sort()->reverse(); $dateColWidth = 100 / ($sortedDates->count() + 3); // Calculate the width of each date column @endphp @foreach ($sortedDates as $date) @endforeach @forelse ($class_member as $student) {{-- @foreach ($sortedDates as $date) @endforeach --}} @foreach ($sortedDates as $date) @if (in_array($student->student_id, $studentsNotInAttendanceByDate[$date]->pluck('student_id')->toArray())) @else @endif @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