

<?php $__env->startSection('content'); ?>
<div class="container mt-3">
    <div class="row justify-content-center">
      <div class="col-md-12 col-lg-12 col-sm-12">
        <a href="<?php echo e(route('user.create')); ?>" ><button type="button" class="btn btn-primary">Add User</button></a>
        <?php if(session('success')): ?>
          <div class="alert alert-success mt-3">
              <?php echo session('success'); ?>

          </div>
        <?php endif; ?>
       <div class="table-responsive">
            <table class="table table-sm table-hover mt-3">
              <thead class="thead-light">
                <tr>
                  <th class="text-left px-3" >Id</th>
                  <th class="text-left px-3" >Name</th>
                  <th class="text-left px-3" >Email</th>
                  <th class="text-left px-3" >Role</th>
                  <th class="text-right px-3" >Action</th>
                </tr>
              </thead>
              <tbody>
              <?php $__currentLoopData = $users; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $user): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                <tr class="text-left">
                  <td class="p-3" style="vertical-align: middle;"> <?php echo e($user->id); ?></td>
                  <td class="p-3" style="vertical-align: middle;"><?php echo e($user->name); ?></td>
                  <td class="p-3" style="vertical-align: middle;"><?php echo e($user->email); ?></td>
                  <td class="p-3" style="vertical-align: middle;"><?php echo e($user->type); ?></td>
                  
                  <td class="d-flex flex-row justify-content-end p-3"> 
                    <a href="<?php echo e(route('user.edit',$user->id)); ?>"class="button_design"><button type="button" class="btn btn-success mb-1 btn-sm">EDIT</button></a>&nbsp;&nbsp;
                    <form action="<?php echo e(route('user.destroy',$user->id)); ?>" method="post">
                      <?php echo csrf_field(); ?>
                      <?php echo method_field('delete'); ?>
                      <button type="submit" class="btn btn-danger btn-sm" data-original-title="" title="" onclick="confirm('<?php echo e(__("Are you sure you want to delete this user?")); ?>') ? this.parentElement.submit() : ''">DELETE</button>&nbsp;&nbsp;
                    </form>
                    <a href="/user/<?php echo e($user->id); ?>/object"><button type="button" class="btn btn-primary btn-sm">ASSIGN OBJECT</button></a>
                  </td>
                </tr>
                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> 
              </tbody>
            </table>
        </div>  

        <div class="d-flex justify-content-center">
        <?php echo e($users->links('user.pagination')); ?>

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



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

<?php echo $__env->make('layouts.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH C:\Projects\import-export-manager\resources\views/user/index.blade.php ENDPATH**/ ?>