| Roll | Student | @foreach($subjects as $sub){{ $sub->name }} | @endforeachTotal | GPA | Class Pos | Sec Pos |
|---|---|---|---|---|---|---|
| Mark | @endforeach||||||
| {{ $r->roll }} | {{ $r->name }} | @foreach($subjects as $sub) @php $col = collect($r->subjects)->firstWhere('subject_id', $sub->id); $disp = $col && $col['is_absent'] ? 'A' : number_format($col['mark'] ?? 0, 2); @endphp{{ $disp }} | @endforeach{{ number_format($r->total, 2) }} | {{ $r->gpa ?? '-' }} | {{ $r->position_class ?? '-' }} | {{ $r->position_section ?? '-' }} |
| Subject Totals | @foreach($subjects as $sub){{ number_format($subjectTotals[$sub->id] ?? 0, 2) }} | @endforeach{{ number_format($grandTotal, 2) }} | ||||