<div class="table-responsive">
    <table id="example" class="table table-bordered align-middle" style="width:100%">
        <thead class="table-light">
            <tr>
                <th class="thbutton">Serial No</th>
                <th>Field Name</th>
                <th>Value</th>
                @if(in_array('advance-settings-edit', $authRolePermissions))
                    <th class="thbutton">Edit</th>
                @endif
            </tr>
        </thead>
        <tbody>
            @php $i=1;@endphp
            @if(count($data)>0)
                @foreach($data as $key=> $list)
                    <tr>
                        <td>{{ $data->firstItem() + $key }}</td>
                        <td>{{ ucfirst($list->field) }}</td>
                        <td>{{ isset($list->advance_setting->value) ? ucfirst($list->advance_setting->value) : '' }}</td>
                        @if(in_array('advance-settings-edit', $authRolePermissions))
                        <td class="text-center">
                            <button data-id="{{ $list->id }}" class="btn btn-outline-secondary edit" data-bs-toggle="modal" data-bs-target="#commonModal" title="Edit">
                                <i class="bi bi-pencil-square"></i>
                            </button>
                        </td>
                        @endif
                    </tr>
                    @php $i++; @endphp
                @endforeach
            @else
                <tr>
                    <td colspan="7">No Data Found</td>
                </tr>
            @endif
        </tbody>
    </table>
</div>
<nav class="float-start mt-2">
    <ul class="pagination">
        {!! $data->onEachSide(0)->render('advance-settings.pagination') !!}
    </ul>
</nav>
</div>

