@extends('admin.layouts.app') @section('title', 'Student Attendance') @section('breadcrumb') @endsection @section('content')
Subject-wise Attendance
@forelse($report as $row) @empty @endforelse @if($report->count()) @endif
SubjectCategoryTotal ClassesPresentAbsentAttendance %
{{ $row->subject_name }} {{ str_replace('_','/',$row->category) }} {{ $row->total }} {{ $row->attended }} {{ $row->absent }}
{{ $row->percentage }}% @if($row->percentage < 75) Below 75% @endif
No attendance records found
Overall Average {{ $report->sum('total') }} {{ $report->sum('attended') }} {{ $report->sum('absent') }} @php $avgPct = $report->count() ? round($report->avg('percentage'),1) : 0; @endphp {{ $avgPct }}%
@endsection