<table>
    <thead>
        <tr>
            <th>S No</th>
            <th>Sudent Name</th>
            <th>Exam Type</th>
            <th>Paper 1</th>
            <th>Paper 2</th>
            <th>Paper 3</th>
            <th>Paper 4</th>
            <th>Paper 5</th>
            <th>Grade / Rank</th>
        </tr>
    </thead>
    <tbody>
        @if(count($mark_details) > 0)
        @foreach($mark_details as $key => $value)
        <tr>
            <td>{{ $key + 1}}</td>
            <td>{{ $value->student_details->name ?? '' }}</td>
            <td>{{ $value->exam_type }}</td>
            <td>{{ $value->paper_1 }}</td>
            <td>{{ $value->paper_2 }}</td>
            <td>{{ $value->paper_3 }}</td>
            <td>{{ $value->paper_4 }}</td>
            <td>{{ $value->paper_5 }}</td>
            <td>{{ $value->grade }}</td>
        </tr>
        @endforeach
        @endif
    </tbody>
  </table>