 <div class="table-responsive">
    <div class="d-flex justify-content-between">
        <h5 class="mb-0">Account images</h5>
        <button type="button" class="btn btn-success" id="createImage"  data-bs-toggle="modal" data-bs-target="#commonModal"><i class="bx bx-plus"></i> Add New</button>
    </div>
    <hr class="mb-2">
    <table id="example" class="table table-bordered align-middle" style="width:100%">
        <thead class="table-light">
            <tr>
                <th class="thbutton">Sl No</th>
                <th>Title</th>
                <th>Image</th>
                <th class="thbutton">Edit</th>
                <th class="thbutton">Delete</th>
            </tr>
        </thead>
        <tbody>
            @php $i=1;@endphp
            @if(count($data)>0)
                @foreach($data as $key=> $list)
                    <tr>
                        <td class="text-center">{{1 + $key}}</td>
                        <td><strong>{!! $list->title !!}</strong></td>
                        <td>
                            @if($list->image_url != '')
                                <a href="{{ route('bucket_file_download', ['filename' => $list->image_url]) }}">Download</a>

                            @endif
                        </td>
                        <td class="text-center">
                            <button data-id="{{ $list->id }}" class="btn btn-warning editAttachment" data-bs-toggle="modal" data-bs-target="#commonModal" title="Edit">
                                <i class="bi bi-pencil-square text-white"></i>
                            </button>
                        </td>
                        <td class="text-center">
                            <a data-url="{{route('account-images.destroy')}}" data-id="{{$list->id}}" class="btn btn-danger deleteData" href="#" class="text-danger" data-bs-toggle="tooltip" data-bs-placement="bottom" title="Delete">
                                <i class="bi bi-trash text-white"></i>
                            </a>
                        </td>
                    </tr>
                    @php $i++; @endphp
                @endforeach
            @else
            <tr>
                <td colspan="5" >No Data Found</td>
            </tr>
            @endif
        </tbody>
    </table>
</div>
</div>

