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

<div class="app-title">
      <div>
        <h1>
        <i class="fa-light fa-receipt mx-1"></i> User Management
        </h1>
        <!-- <p>View All Attendance</p> -->
      </div>
    </div>

   

    <section class="leavereq-info">
      <div class="container">
        <div class="row">
          <div class="col-md-12">
            <div class="buttons-container">
              <div id="buttons-container">
              </div>
            </div>
          </div>
        </div>
        <div class="row justify-content-center">
          <div class="col-md-12 col-lg-12 col-sm-12 col-xs-12">
            <div class="tile">
              <div class="tile-body">
                <div class="table-responsive">
                  <!-- table start from here -->
                  <table class="table table-hover table-bordered" id="sampleTable">

                    <thead>
                    <tr>
                      <th>S.No.</th>
                        <th>First Name</th>
                        <th>Last Name</th>
                        <th>Belonging Church</th>
                        <th>User Role</th>
                        <th>User Status</th>
                      </tr>
                    </thead>
                    <tbody>
                   <?php if(count($users) > 0): ?>
                   <?php $__currentLoopData = $users; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $user): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                      <tr>
                        <td><?php echo e($loop->iteration); ?></td>
                        <td><?php echo e($user->first_name ?? ''); ?></td>
                        <td><?php echo e($user->last_name ?? ''); ?></td>
                        <td><?php echo e($user->church->church_name ?? ''); ?></td>
                        <td><?php echo e($user->user_role?? ''); ?></td>
                        <td><?php echo e($user->user_status?? ''); ?></td>
                      </tr>
                      <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                      <?php else: ?>
                      <tr>
                        
                        <td colspan="7" class="text-center">No Users Found</td>
                        
                      </tr>
                      <?php endif; ?>

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

    <script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>
    <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>

<?php $__env->stopSection(); ?>
<?php echo $__env->make('admin.layouts.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH C:\xampp2\htdocs\churchappadmin\resources\views/admin/user.blade.php ENDPATH**/ ?>