@php $school = \App\Models\Setting::school(); $termRecord = \App\Models\AcademicTerm::where('term', $term ?? current_term())->where('year', $year ?? current_year())->first(); $present = ($attendance['Present'] ?? 0) + ($attendance['present'] ?? 0); $attendanceTotal = collect($attendance ?? [])->sum(); $attendanceRate = $attendanceTotal > 0 ? round($present / $attendanceTotal * 100) : null; $remarks = ['A' => 'Excellent', 'A-' => 'Very good', 'B+' => 'Very good', 'B' => 'Good', 'B-' => 'Good', 'C+' => 'Fair', 'C' => 'Fair', 'C-' => 'Average', 'D+' => 'Below average', 'D' => 'Below average', 'D-' => 'Weak', 'E' => 'Very weak']; @endphp

{{ $school }}

@if(\App\Models\Setting::get('school_motto'))
{{ \App\Models\Setting::get('school_motto') }}
@endif
{{ \App\Models\Setting::get('school_address') }}{{ \App\Models\Setting::get('school_postal') ? ' · '.\App\Models\Setting::get('school_postal') : '' }}

Student report card

Student{{ $student->full_name }} Admission no{{ $student->admission_no }} Class{{ $student->class_label }}
TermTerm {{ $term ?? current_term() }}, {{ $year ?? current_year() }} Exam{{ $exam->name ?? '—' }} Stream{{ $student->stream ?: '—' }}
Term dates{{ $termRecord && $termRecord->start_date ? \Carbon\Carbon::parse($termRecord->start_date)->format('d M Y') : '—' }} — {{ $termRecord && $termRecord->end_date ? \Carbon\Carbon::parse($termRecord->end_date)->format('d M Y') : '—' }} Attendance{{ $attendanceRate !== null ? $attendanceRate.'%' : '—' }} Class teacher{{ $classTeacher->full_name ?? '—' }}
@forelse($subjects as $i => $subject) @php $m = $row['marks'][$subject->id] ?? null; @endphp @empty @endforelse
#SubjectScoreGradePointsRemarks
{{ $i + 1 }} {{ $subject->name }} {{ $m ? number_format($m['score'], 1) : '—' }} {{ $m['grade'] ?? '—' }} {{ $m['points'] ?? '—' }} {{ $m ? ($remarks[$m['grade']] ?? '') : 'Not examined' }}
No marks recorded for this exam.
Total marks
{{ $row ? number_format($row['total'], 1) : '—' }}
Average
{{ $row ? number_format($row['average'], 1).'%' : '—' }}
Mean grade
{{ $row['mean_grade'] ?? '—' }}
Total points
{{ $row['points'] ?? '—' }}
Stream position
{{ $row['stream_position'] ?? '—' }}
Overall position
{{ $row['overall_position'] ?? '—' }}
Class teacher's remarks
{{ $row ? ($row['average'] >= 70 ? 'An excellent performance. Keep up the hard work.' : ($row['average'] >= 50 ? 'A fair performance. More effort will improve your results.' : 'Below expectations. A structured revision plan is recommended.')) : ' ' }}
Principal's remarks
{{ $row ? ($row['average'] >= 65 ? 'Congratulations on a commendable term.' : 'Work closely with your teachers next term.') : ' ' }}
Class teacher: {{ $classTeacher->full_name ?? '________________' }} Principal: {{ \App\Models\Setting::get('principal_name', '________________') }} Parent / guardian: ________________
Generated on {{ now()->format('j M Y H:i') }} · {{ $school }} · This is a computer-generated report card.