 <div class="table-responsive">
     <table class="table table-bordered align-middle" style="width:100%">
         <thead class="table-light">
             <tr>
                 <th class="thbutton">Sl No</th>
                 <th>Name </th>
                 <th>Card Code</th>
                 <th>Member Ref. No.</th>
                 <th>Class</th>
                 <th>Section </th>
                 <th>Date of Issue</th>
                 <th>Valid Upto</th>
                 <th class="thbutton" align="center">Status</th>
             </tr>
         </thead>
         <tbody>
             @php $i=1;@endphp
             @if(count($libraryCard))
             @foreach($libraryCard as $key=> $row)
             <tr>
                 <td>{{$libraryCard->firstItem() + $key}}</td>
                 <td>
                     @if(isset($row->getStudentDetails->name))
                     {{$row->getStudentDetails->name}}
                     @endif
                 </td>
                 <td><a href="{{route('cards.show',$row->id)}}">{{$row->card_no}}</a></td>
                 <td>
                     @if(isset($row->getStudentDetails->unique_register_no))
                     {{$row->getStudentDetails->unique_register_no}}
                     @endif
                 </td>

                 <td>
                     @if(isset($row->getClassName->class_name))
                     {{$row->getClassName->class_name}}
                     @endif
                 </td>
                 <td>
                     @if(isset($row->getSectionName->academics_section_id))
                     {{$row->getSectionName->academics_section_id}}
                     @endif
                 </td>
                 <td>{{$row->date_of_issue}}</td>
                 <td>{{$row->valid_upto}}</td>
                 <td align="center">
                     <div class="form-check form-check-inline{{$i}}">
                         <input class="form-check-input{{$i}} btn-lg changeStatusCustom" type="checkbox" id="inlineCheckbox{{$i}}" data-url="{{route('cards.changestatus')}}" data-id="{{$row->id}}" data-status="{{$row->card_status=='0' ? '1' : '0'}}" {{ $row->card_status=='1' ? 'checked' : ''}}>
                     </div>
                 </td>

             </tr>
             @php $i++; @endphp
             @endforeach
             @else
             <tr>
                 <td colspan="8">No Data Found</td>
             </tr>
             @endif
         </tbody>
     </table>
 </div>
 <div class="table-responsive">
     <nav class="float-start mt-2">
         <ul class="pagination">
             {!! $libraryCard->onEachSide(1)->render('library.cards.pagination') !!}
         </ul>
     </nav>
 </div>
 </div>