Attendance for {{ \Carbon\Carbon::parse($month)->format('F Y') }}
প = উপস্থিত (Present)
এ = অনুপস্থিত (Absent)
দে = দেরিতে উপস্থিত (Late Present)
ছু = ছুটি (Holiday)
অ = অর্ধেক দিন (Half Day)
| Student Name | @for ($i = 1; $i <= 31; $i++){{ $i }} | @endforপ | এ | দে | ছু | অ |
|---|---|---|---|---|---|---|
| @endfor | ||||||
| {{ $attendance->students->name }} | @php // Initialize the counters for each status $presentCount = 0; $absentCount = 0; $latePresentCount = 0; $holidayCount = 0; $halfDayCount = 0; $attendanceMonth = \Carbon\Carbon::parse($attendance->date)->format('Y-m'); @endphp @for ($i = 1; $i <= 31; $i++)@php // Check if the attendance record exists for the specific date $attendanceStatus = $attendance->whereNull('teacher_id')->firstWhere( 'date', \Carbon\Carbon::parse("{$attendanceMonth}-{$i}") ); @endphp @if ($attendanceStatus) @switch($attendanceStatus->status) @case(1) {{ __('প') }} @php $presentCount++; @endphp @break @case(2) {{ __('এ') }} @php $absentCount++; @endphp @break @case(3) {{ __('দে') }} @php $latePresentCount++; @endphp @break @case(4) {{ __('ছু') }} @php $holidayCount++; @endphp @break @case(5) {{ __('অ') }} @php $halfDayCount++; @endphp @break @default @endswitch @else @endif | @endfor{{ $presentCount }} | {{ $absentCount }} | {{ $latePresentCount }} | {{ $holidayCount }} | {{ $halfDayCount }} |