
<?php $__env->startSection('title', 'All Users'); ?>
<?php $__env->startSection('content'); ?>
<div class="container-fluid">         
                                          <h3 class="mb-2 main-heading">Costumers</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>S.No</th>
                                         <th>Name</th> 
                                         <th>Email</th> 
                                         <th>Phone</th> 
                                         <th>Status</th> 
                                        <th></th>
                                    </tr>
                                 </thead>
                                   <?php if(!empty($users)): ?>
                                   <?php $__currentLoopData = $users; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $user): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                      <tr>
                                          <td scope="row"><?php echo e($loop->iteration); ?></td>
                                          <td><?php echo e($user->name); ?></td>
                                          <td><?php echo e($user->email); ?></td> 
                                          <td>9876768543</td> 
                                          <td> 
                                                 <?php if($user->is_active): ?>
                                                              <?php $statusBtn = '<a title="Deactivate" href="'. route('change_status', ['type' => 'user', 'id' => $user->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' => 'user', 'id' => $user->id, 'status' => '1']) .'" class="btn btn-success btn-sm"><i class="fa fa-user-plus" aria-hidden="true"></i></a>' ?>
                                                                  Deactive
                                                              <?php endif; ?>
                                          
                                          <td>
                                              <div class="actions">
                                                  <?php echo $statusBtn; ?>

                                              <a href="<?php echo e(route('admin.users.show', $user->id)); ?>" title="Delete"><i class="fas faslli fa-eye"></i></a>
                                              <span> <a href="#" title="Profile"><i class="fas faslli fa-user"></i></a> </span>
                                              <span> <a href="<?php echo e(route('admin.users.edit', $user->id)); ?>" title="Edit"><i class="fas faslli fa-pen"></i></a> </span>
                                              <span> <a href="#" title="Mail"><i class="fas faslli fa-mail-bulk"></i></a> </span>
                                              </div>
                                              </td>
                                      </tr>
                                      <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                      <?php else: ?>
                                         <div class="text-center">
                                              <h3>No User 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/user/index.blade.php ENDPATH**/ ?>