<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Filtered Data</title>
</head>
<body>
    <h1>Filtered Data</h1>

    @if($data->isEmpty())
        <p>No data found for the given criteria.</p>
    @else
    @foreach ($classe->eleves as $index => $eleve)
      <h1>{{ $eleve->first_name }}</h1>

    @endforeach
        <table border="1">
            <thead>
                <tr>
                    <th>ID</th>
                    <th>Rank</th>
                    <th>Quarter Average</th>
                    <th>Main Exam</th>
                    <th>Monitoring Exam 1</th>
                    <th>Monitoring Exam 2</th>
                    <th>Written Tests</th>
                    <th>Practical Work</th>
                    <th>Oral Exam</th>
                    <th>Sum</th>
                    <th>Coefficient</th>
                    <th>eleve</th>

                </tr>
            </thead>
            <tbody>
                @foreach($data as $item)
                    <tr>
                        <td>{{ $item->id }}</td>
                        <td>{{ $item->rank }}</td>
                        <td>{{ $item->quarter_average }}</td>
                        <td>{{ $item->main_exam }}</td>
                        <td>{{ $item->monitoring_exam_1 }}</td>
                        <td>{{ $item->monitoring_exam_2 }}</td>
                        <td>{{ $item->written_tests }}</td>
                        <td>{{ $item->practical_work }}</td>
                        <td>{{ $item->oral_exam }}</td>
                        <td>{{ $item->sum }}</td>
                        <td>{{ $item->coefficient }}</td>
                        <td>{{ $item->eleve->first_name }}</td>


                    </tr>
                @endforeach
            </tbody>
        </table>
    @endif
</body>
</html>
