@extends('schoolLayout.app') @section('content') @if (session('error'))
| Student | Roll No | Class | Present | Absent | Leave | Attendance % |
|---|---|---|---|---|---|---|
{{ $student->student_name }} |
{{ $student->latestAdmission->roll_number }} | {{ $student->classes->first()->name }} - Section-{{ $student->sections->first()->name }} | {{ $student->present_count }} | {{ $student->absent_count }} | {{ $student->leave_count }} | @php $present = $student->present_count ?? 0; $total = $student->total_attendance_count ?? 0; $percent = $total > 0 ? round(($present / $total) * 100, 1) : 0; @endphp {{ $percent }}% |