
<?php $__env->startSection('title'); ?> ইউজার <?php $__env->stopSection(); ?>
<?php $__env->startSection('users'); ?> active <?php $__env->stopSection(); ?>
<?php $__env->startSection('users.index'); ?> active <?php $__env->stopSection(); ?>
<?php $__env->startSection('styles'); ?>
<?php $__env->stopSection(); ?>
<?php $__env->startSection('admin_content'); ?>

<!-- BEGIN: Content-->
<div class="app-content content ">
  <div class="card">
    <div class="card-header">
      <div class="head-label">
        <h4>ইউজারের তালিকা</h4>
      </div>
      <div class="dt-action-buttons text-right">
        <div class="dt-buttons d-inline-flex">

          <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('user-create')): ?>
          <a href="<?php echo e(route('users.create')); ?>" class="btn btn-primary">নতুন ইউজার</a>
          <?php endif; ?>
        </div>
      </div>
    </div>
    <div class="card-body">
      <div class="table-responsive custom-table-modify">
        <table id="myTable" class="table table-bordered">
          <thead>
            <tr>
              <th scope="col">সিরিয়াল নং</th>
              <th scope="col">নাম</th>
              <th scope="col">ইমেইল</th>
              <th scope="col">মোবাইল</th>
              <th scope="col">রোল</th>
              <th scope="col">একশন</th>
            </tr>
          </thead>
          <tbody>

            <?php $__currentLoopData = $data; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
            <?php if(isset($item) && $item != null): ?>
            <tr>
              <td><?php echo e($loop->index+1); ?></td>
              <td><?php echo e($item->name); ?></td>
              <td><?php echo e($item->email); ?></td>
              <td><?php echo e($item->mobile); ?></td>
              <td>
                <?php $__currentLoopData = $item->roles; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $role): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                <span class="badge bg-info">
                  <?php echo e($role->name); ?>

                </span>
                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
              </td>


              <td>
                <div class="dropdown">
                  <button type="button" class="btn btn-sm dropdown-toggle hide-arrow py-0" data-bs-toggle="dropdown">
                    <i data-feather="more-vertical"></i>
                  </button>
                  <div class="dropdown-menu dropdown-menu-end">

                    <!--     <?php if($item->status == 1): ?>
                                              <a href="" class="dropdown-item" title="Inactive"><i data-feather="edit-2" class="me-50"></i></i>
                                               <span>Inactive</span> </a>
                                            <?php else: ?>
                                              <a href="" class="dropdown-item" title="view"><i data-feather="edit-2" class="me-50"></i> <span>Active</span> </a>
                                            <?php endif; ?>

 -->
                    <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('user-edit')): ?>
                    <a class="dropdown-item" href="<?php echo e(url('/users-edit/'.$item->id)); ?>">
                      <i data-feather="edit" class="me-50"></i>
                      <span>Edit</span>
                    </a>
                    <?php endif; ?>

                    <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('user-delete')): ?>
                    <form method="POST" action="<?php echo e(route('users.destroy', $item->id)); ?>" class="d-inline">
                      <?php echo csrf_field(); ?>
                      <?php echo method_field('delete'); ?>
                      <button type="submit" title="delete"
                        class="bg-transparent border-0 dropdown-item w-100 delete-confirm">
                        <i data-feather="trash" class="me-50"></i>
                        <span>Delete</span>
                      </button>
                    </form>
                    <?php endif; ?>

                  </div>
                </div>
              </td>

            </tr>
            <?php endif; ?>
            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>


          </tbody>
        </table>
      </div>
    </div>
  </div>

</div>
<!-- END: Content-->

<?php $__env->stopSection(); ?>
<?php echo $__env->make('admin.master', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH E:\Project\Personal-Project\Office-Project\update\testpaper-final\resources\views/admin/userRole/users/index.blade.php ENDPATH**/ ?>