<?php $__env->startSection('title', 'User List'); ?>

<?php $__env->startSection('page-header'); ?>
<header class="header bg-ui-general">
     <div class="header-info">
          <h1 class="header-title">
               <strong>Users</strong>
          </h1>
     </div>

     <div class="header-action">
          <nav class="nav">
               <a class="nav-link active" href="<?php echo e(route('users.index')); ?>">
                    Users
               </a>
               <a class="nav-link" href="<?php echo e(route('users.create')); ?>">
                    <i class="fa fa-plus"></i>
                    New User
               </a>
          </nav>
     </div>
</header>
<?php $__env->stopSection(); ?>

<?php $__env->startSection('content'); ?>

<div class="col-12">
     <div class="card">
          <h4 class="card-title"><strong>Users</strong></h4>

          <div class="card-body card-body-soft">
               <?php if($users->count() > 0): ?>
               <div class="table-responsive-sm table-bordered">
                    <table class="table table-soft">
                         <thead>
                              <tr class="bg-primary">
                                   <th>#</th>
                                   <th>Name</th>
                                   <th>Father</th>
                                   <th>Mother</th>
                                   <th>Mobile No</th>
                                   <th>Address</th>
                                   <th>Email</th>
                                   <th>Role</th>
                                   <th>Avater</th>
                                   <th>#</th>
                              </tr>
                         </thead>

                         <tbody>
                              <?php $__currentLoopData = $users; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                              <tr>
                                   <td><?php echo e(++$key); ?></td>
                                   <td><?php echo e(ucfirst($item->fname )); ?> <?php echo e(ucfirst($item->lname )); ?></td>
                                   <td><?php echo e($item->father_name ?? '-'); ?></td>
                                   <td><?php echo e($item->mother_name ?? '-'); ?></td>
                                   <td><?php echo e($item->mobile_no ?? '-'); ?></td>
                                   <td><?php echo e($item->address ?? '-'); ?></td>
                                   <td><?php echo e($item->email); ?></td>
                                   <td>
                                        <?php $__currentLoopData = $item->getRoleNames(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $role): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                             <?php echo e(ucfirst($role)); ?>,
                                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                   </td>
                                   <td>
                                        <img src="<?php echo e(asset($item->profile->avatar)); ?>" alt="Avatar" width="60">
                                   </td>
                                   <td>
                                        <a href="<?php echo e(route('users.edit', $item->id)); ?>" data-provide="tooltip"
                                             data-tooltip-color="info" title="Role Edit" class="btn btn-info btn-xs">
                                             <i class="fa fa-edit"></i>
                                        </a>
                                        <a href="<?php echo e(route('users.destroy',$item->id)); ?>" data-provide="tooltip" data-tooltip-color="danger"
                                             title="Role Delete" class="btn btn-danger btn-xs delete">
                                             <i class="fa fa-trash"></i>
                                        </a>
                                   </td>
                              </tr>
                              <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                         </tbody>

                    </table>
                    <?php echo e($users->links()); ?>

               </div>
               <?php else: ?>
               <div class="alert alert-danger" role="alert">
                    <strong>You have no Users</strong>
               </div>
               <?php endif; ?>
          </div>
     </div>
</div>
<?php $__env->stopSection(); ?>

<?php $__env->startSection('styles'); ?>
<style>
     .table tr td {
          vertical-align: middle;
          padding: 5px;
          text-align: center;
          font-weight: 500;
     }

     .table tr th {
          text-align: center;
     }
</style>
<?php $__env->stopSection(); ?>

<?php $__env->startSection('scripts'); ?>
    <?php echo $__env->make('includes.delete-alert', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('layouts.master', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/demosoftghor/sm.demo.softghor.com/resources/views/pages/users/index.blade.php ENDPATH**/ ?>