
<?php $__env->startSection('title', 'All Reviews'); ?>
<?php $__env->startSection('content'); ?>
<div class="container-fluid">         
                                          <h3 class="mb-2 main-heading">Reviews</h3>

                    <div class="row">
                    <div class="col-lg-12">

                            <div class="table-responsive bg-white p-3">
                            <table class="table table-justified" id="example">
                                <thead>
                                    <tr>
                                        <th>Sno</th>
                                        <th>Customer</th>
                                        <th>Review</th>
                                        <th>Images</th>
                                         <th>Status</th>
                                         <th>Action</th>
                                    </tr>
                                 </thead>
                                <?php if($reviews->count() > 0): ?>  
                                     <?php $__currentLoopData = $reviews; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $review): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>                              
                                      <tr>
                                            <td scope="row"><?php echo e($loop->iteration); ?></td>
                                            <td><?php echo e($review->user->name); ?></td>
                                            <td><?php echo e($review->description); ?></td>
                                            <td>
																							<div class="row mt-2">
																										<div class="col-md-12 col-lg-12 form-outline mb-2">
																												<?php if(!empty($review->image)): ?>
																													<div class="position-relative d-inline p-1">
																															<img src="<?php echo e(!empty($review->image) ? asset('storage/'.$review->image) : '#'); ?>" alt="your image" width="50" height="50"/>
																													</div>
																												<?php endif; ?>
																												<?php if(!empty($review->image1)): ?>
																													<div class="position-relative d-inline p-1">
																															<img src="<?php echo e(!empty($review->image1) ? asset('storage/'.$review->image1) : '#'); ?>" alt="your image" width="50" height="50"/>
																													</div>
																												<?php endif; ?>
																												<?php if(!empty($review->image2)): ?>
																													<div class="position-relative d-inline p-1">
																															<img src="<?php echo e(!empty($review->image2) ? asset('storage/'.$review->image2) : '#'); ?>" alt="your image" width="50" height="50"/>
																													</div>
																												<?php endif; ?>
																												<?php if(!empty($review->image3)): ?>
																													<div class="position-relative d-inline p-1">
																															<img src="<?php echo e(!empty($review->image3) ? asset('storage/'.$review->image3) : '#'); ?>" alt="your image" width="50" height="50"/>
																													</div>
																												<?php endif; ?>
																													
																										</div>
																						</div>
																						</td>

                                            <td>
                                                      <?php if($review->status): ?>
                                                              <?php $statusBtn = '<a title="Deactivate" href="'. route('change_status', ['type' => 'review', 'id' => $review->id, 'status' => '0']) .'" class="btn btn-danger btn-sm"><i class="fa fa-user-times" aria-hidden="true"></i></a>' ?>
                                                                  Active
                                                              <?php else: ?>
                                                                  <?php $statusBtn = '<a title="Activate" href="'. route('change_status', ['type' => 'review', 'id' => $review->id, 'status' => '1']) .'" class="btn btn-success btn-sm"><i class="fa fa-user-plus" aria-hidden="true"></i></a>' ?>
                                                                  Deactive
                                                              <?php endif; ?>
                                            </td>
                                             <td>
                                                              <?php echo $statusBtn; ?>

                                                              
                                               </td>
                                            
                                      </tr>
                                      <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                  <?php else: ?>
                                         <div class="text-center">
                                              <h3>No Order Found</h3>
                                         </div>
                                      <?php endif; ?>
                                </table>

                            </div>
                        </div>
                    </div>
                </div>
<?php $__env->stopSection(); ?>

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>

<script type="text/javascript" charset="utf8" src="https://cdn.datatables.net/1.11.1/js/jquery.dataTables.js" defer></script>
<script type="text/javascript" charset="utf8" src="https://cdn.datatables.net/buttons/2.0.0/js/dataTables.buttons.min.js" defer></script>
<script type="text/javascript" charset="utf8" src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js" defer></script>
<script type="text/javascript" charset="utf8" src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.53/pdfmake.min.js" defer></script>
<script type="text/javascript" charset="utf8" src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.53/vfs_fonts.js" defer></script>
<script type="text/javascript" charset="utf8" src="https://cdn.datatables.net/buttons/2.0.0/js/buttons.html5.min.js" defer></script>
<script type="text/javascript" charset="utf8" src="https://cdn.datatables.net/buttons/2.0.0/js/buttons.print.min.js" defer></script>

<script>



    $(document).ready(function() {
        $('#example').DataTable( {
            dom: 'Bfrtip',
            buttons: [
                 ''
            ]
        } );

} );

    
</script>

<?php echo $__env->make('admin.layouts.dashboard', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH C:\xampp\htdocs\chittar\resources\views/admin/review/index.blade.php ENDPATH**/ ?>