<div class="card-body" id="tables">
    <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>Users</th>
                    <th class="thbutton">Permissions</th>
                </tr>
            </thead>
            <tbody>
                @php $i=1;@endphp
                @if(count($data)>0)
                    @foreach ($data as $key => $user)
                        <tr>
                            <td>{{$key+1}}</td>
                            <td>{{ $user->name }}</td>
                            <td class="text-center">
                                <a href="{!! route('departments.permission-edit', $user->id) !!}" class="btn btn-info button-large">
                                    <i class="bi bi-shield-lock-fill text-white"> Edit</i>
                                </a>
                            </td>
                        </tr>
                    @endforeach
                @else
                    <tr>
                        <td colspan="5">No Data Found</td>
                    </tr>
                @endif
            </tbody>
        </table>
    </div>
</div>
<nav class="row align-items-center mt-3">
    <ul class="col-md-6">
        {!! $data->onEachSide(0)->render('departments.pagination') !!}
    </ul>
</nav>
</div>