@if($resultsGrouped->isEmpty())
No results found for this exam.
@else
@foreach($resultsGrouped as $studentId => $rows) @php $first = true; $student = $rows->first()->student; // may be null safety @endphp @foreach($rows as $row) @if($first) @php $first = false; @endphp @endif @endforeach @endforeach
Student Subject Obtained Grade Grade Point Remarks
{{ $student->full_name ?? 'Student #'.$studentId }}
Roll: {{ $student->roll ?? '-' }}
{{ $row->subject->name ?? '—' }} {{ $row->total_obtained ?? '-' }} {{ $row->grade ?? '-' }} {{ $row->grade_point ?? '-' }} {{ $row->remarks ?? '-' }}
@endif