 <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>Sl No</th>
                     <th>Name</th>
                     <th>Phone</th>
                     <th>Email</th>
                     <th>City</th>
                     {{--<th>Address</th>
                     <th>Pincode</th>
                     <th>Slot</th>
                     <th>Message</th>--}}
                     <th>Date</th>
                     <th class="thbutton">Enquiry Status</th>
                     <th class="thbutton">Status</th>
                     <th class="thbutton">Edit</th>
                     <th class="thbutton">Delete</th>
                 </tr>
             </thead>
             <tbody>
                 @php $i=1;@endphp
                 @if(count($HomeCollection)>0)
                 @foreach($HomeCollection as $key=> $row)
                 <tr>
                     <td>{{$HomeCollection->firstItem() + $key}}</td>
                     <td>@if(isset($row->name)){{$row->name}}@endif</td>
                     <td>@if(isset($row->phone)){{$row->phone}}@endif</td>
                     <td>@if(isset($row->email)){{$row->email}}@endif</td>
                     <td>@if(isset($row->city)){{$row->city}}@endif</td>
                     {{--<td>@if(isset($row->address)){{$row->address}}@endif</td>
                     <td>@if(isset($row->pincode)){{$row->pincode}}@endif</td>
                     <td>@if(isset($row->slot_name)){{$row->slot_name}}@endif</td>
                     <td>@if(isset($row->message)){{$row->message}}@endif</td>--}}
                     <td>@if(isset($row->vdate)){{date('Y-m-d',strtotime($row->vdate))}}@endif</td>
                     <td>
                     <span data-bs-toggle="modal" data-bs-target="#exampleModal{{$row->id}}" class="btn text-white 
                            @if($row->collection_status=='Pending'){{'btn-info bg-info'}}@elseif($row->collection_status=='Accepted'){{'btn-success bg-success'}}
                            @elseif($row->collection_status=='Rejected'){{'btn-danger bg-danger'}}@endif">
                            @if(isset($row->collection_status)){{$row->collection_status}}@endif</span>
                    </td>
                     <td align="center">
                         <div class="form-check form-check-inlinecheckstatus{{$row->id}}">
                             <input class="form-check-inputcheckstatus{{$row->id}} btn-lg changeStatus" type="checkbox" id="inlineCheckboxcheckstatus{{$row->id}}" data-url="{{route('home-collections.changestatus')}}" data-id="{{$row->id}}" data-status="@if($row->status=='0'){{'1'}}@elseif($row->status=='1'){{'0'}}@endif" @if($row->status=='1'){{'checked'}}@elseif($row->status=='0'){{''}}@endif>
                         </div>

                     </td>
                     <td align="center">
                         <a href="{{route('home-collections.edit',$row->id)}}"  class="btn btn-warning"  title="Edit">
                             <i class="bi bi-pencil-square text-white"></i>
                         </a>
                    </td>
                    <td align="center">
                         <a href="#" data-url="{{route('home-collections.delete')}}" data-id="{{$row->id}}" class="btn btn-danger deleteData" data-bs-toggle="tooltip" data-bs-placement="bottom" title="Delete">
                             <i class="bi bi-trash-fill text-white"></i>
                         </a>
                    </td>

                 </tr>

                 <!-- Button trigger modal -->

                <!-- Modal -->
                <div class="modal fade" id="exampleModal{{$row->id}}" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true">
                <div class="modal-dialog">
                    <div class="modal-content">
                    <div class="modal-header">
                        <h5 class="modal-title" id="exampleModalLabel">Site Visit Status</h5>
                        <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
                    </div>
                    <form class="g-3 row auto-width ajaxformfileupload" action="{{route('home-collections-status.update',$row->id)}}" method="POST" enctype='multipart/form-data'>
                    @method('PUT')
                    <div class="modal-body">
                        <label>Visit Status</label>
                        <select class="form-control" name="collection_status">
                            <option value="Pending" @if($row->collection_status=='Pending'){{'selected'}}@endif>Pending</option>
                            <option value="Rejected" @if($row->collection_status=='Rejected'){{'selected'}}@endif>Rejected</option>
                            <option value="Accepted" @if($row->collection_status=='Accepted'){{'selected'}}@endif>Accepted</option>
                        </select>
                    </div>
                    <div class="modal-footer">
                        <div class="col-12" align="center">
                            <div class="d-grid gap-2">
                                <button class="btn btn-primary mt-3" type="submit"><i class="bx bx-save"></i> Update Status</button>
                            </div>
                        </div>
                    </div>
                    </form>
                    </div>
                </div>
                </div>
                
                 @php $i++; @endphp
                 @endforeach
                 @else
                 <tr>
                     <td colspan="10">No Data Found</td>
                 </tr>
                 @endif
             </tbody>
         </table>
     </div>
     <div class="table-responsive">
         <nav class="float-start mt-2">
             <ul class="pagination">
                 {!! $HomeCollection->onEachSide(0)->render('website-setting.HomeCollections.pagination') !!}
             </ul>
         </nav>
     </div>
 </div>