 <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>Name</th>
                <th>Date of Birth</th>
                <th>Gender</th>
                <th>Category</th>
                <th>Phone No</th>
                <th>Priority</th>
                @if(in_array('faculty-edit', $authRolePermissions))
                <th class="thbutton">Edit</th>
                @endif
                @if(in_array('faculty-delete', $authRolePermissions))
                <th class="thbutton">Delete</th>
                @endif
            </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('faculty.show',$list->id)}}"><strong>{{ucfirst($list->name)}}</strong></a></td>
                        <td>{!! formatedDate($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->priority !!}</td>
                        @if(in_array('faculty-edit', $authRolePermissions))
                        <td class="text-center">
                            <a href="{{route('faculty.edit',$list->id)}}" class="btn btn-outline-secondary" data-bs-toggle="tooltip" data-bs-placement="bottom" title="Edit">
                                <i class="bi bi-pencil-square"></i>
                            </a>
                        </td>
                        @endif
                        @if(in_array('faculty-delete', $authRolePermissions))
                        <td class="text-center">
                            <a data-url="{{route('faculty.destroy',$list->id)}}" data-id="{{$list->id}}" class="btn btn-danger deleteDataCustom" href="#" class="text-danger" data-bs-toggle="tooltip" data-bs-placement="bottom" title="Delete">
                                <i class="bi bi-trash text-white"></i>
                            </a>
                        </td>
                        @endif
                    </tr>
                    @php $i++; @endphp
                @endforeach
            @else
            <tr>
                <td colspan="10">No Data Found</td>
            </tr>
            @endif
        </tbody>
    </table>
</div>
<nav class="float-start mt-2">
    <ul class="pagination">
        {!! $data->onEachSide(0)->render('faculty.pagination') !!}
    </ul>
</nav>
</div>
