 <div class="table-responsive">
    <table id="example" class="table table-bordered align-middle" style="width:100%">
        <thead class="table-light">
            <tr>
                <th class="thbutton">Sl No</th>
                <th>Admission No</th>
                <th>Student Name</th>
                <th>Date of Birth</th>
                <th>Gender</th>
                <th>Category</th>
                <th>Phone No</th>
                <th>House</th>
                <th>Class</th>
                <th>Section</th>
            </tr>
        </thead>
        <tbody>
            @php $i=1;@endphp
            @if(count($data)>0)
                @foreach($data as $key=> $list)
                    <tr>
                        <td class="text-center">{{$data->firstItem() + $key}}</td>
                        <td>{!! $list->unique_register_no !!}</td>
                        <td><a href="{{route('students.show',$list->id)}}"><strong>{{ucfirst($list->name)}}</strong></a></td>
                        <td>{!! $list->date_of_birth !!}</td>
                        <td>{!! $list->gender !!}</td>
                        <td>{!! $list->category !!}</td>
                        <td><a href="tel:{{$list->phone_no}}">{{$list->phone_no}}</a><br>
                            {{$list->email}}
                        </td>
                        <td>{!! $list->house_name !!}</td>
                        <td>{!! $list->class_name !!}</td>
                        <td>{!! $list->section !!}</td>
                    </tr>
                    @php $i++; @endphp
                @endforeach
            @else
            <tr>
                <td colspan="10">No Data Found</td>
            </tr>
            @endif
        </tbody>
    </table>
</div>
<nav class="row align-items-center mt-3">
    <div class="col-md-6">
        {!! $data->onEachSide(0)->render('students.pagination') !!}
    </div>
    @if(auth()->user()->can('students-list'))
    <div class="col-md-6" style="text-align: right;">
        <div class="btn-group mb-0">
            <a href="javascript:;" class="btn btn-outline-primary export-statement"><i class="bi bi-download"></i> Export</a>
        </div>
    </div>
    @endif
</nav>
</div>
