@extends('dashboard.master') @section('css') @endsection @section('content')
Student Attendance

Attendance for {{ \Carbon\Carbon::parse($month)->format('F Y') }}

প = উপস্থিত (Present)
এ = অনুপস্থিত (Absent)
দে = দেরিতে উপস্থিত (Late Present)
ছু = ছুটি (Holiday)
অ = অর্ধেক দিন (Half Day)
@for ($i = 1; $i <= 31; $i++) @endfor @for ($i = 1; $i <= 31; $i++) @endfor @foreach ($attendanceData as $attendance) @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++) @endfor @endforeach
Student Name{{ $i }} দে ছু
{{ $attendance->students->name }} @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 {{ $presentCount }} {{ $absentCount }} {{ $latePresentCount }} {{ $holidayCount }} {{ $halfDayCount }}
@endsection