<?php $__env->startSection('section-title', 'User Management'); ?>
<?php $__env->startSection('page-title', 'User List'); ?>
<?php if(check_permission('user.create')): ?>
    <?php $__env->startSection('action-button'); ?>
        <a class="btn add_list_btn" href="<?php echo e(route('user.create')); ?>">
            <i class="mr-2 feather icon-plus"></i>
            Add User
        </a>
    <?php $__env->stopSection(); ?>
<?php endif; ?>
<?php $__env->startSection('content'); ?>
    <div class="row">
        <div class="col-lg-12">
            <div class="card m-b-30 card_style">
                <div class="card-header">
                    <h5 class="card-title">User List</h5>
                </div>
                <div class="card-body">
                    <div class="table-responsive">
                        <table id="datatable-buttons" class="table table-striped text-center">
                            <thead>
                                <tr class="header_bg">
                                    <th class="header_style_left">ID</th>
                                    <th>Photo</th>
                                    <th>Name</th>
                                    <th>Email</th>
                                    <th>Phone</th>
                                    <th>User Role</th>
                                    <th>Status</th>
                                    <th class="header_style_right">Actions</th>
                                </tr>
                            </thead>
                            <tbody>
                                <?php $__currentLoopData = $users; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $user): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                    <tr>
                                        <td class="table_data_style_left"><?php echo e($loop->index + 1); ?></td>
                                        <td>
                                            <img src="<?php echo e((!empty($user->image))?url('public/uploads/users/'.$user->image):url('public/backend/images/users/profile.svg')); ?>" alt="<?php echo e($user->name); ?>" style="height: 30px; width: 30px;">
                                        </td>
                                        <td><?php echo e($user->name); ?></td>
                                        <td><?php echo e($user->email); ?></td>
                                        <td><?php echo e(($user->phone!=NULL)?$user->phone:'--'); ?></td>
                                        <td><?php echo e($user->role->name); ?></td>
                                        <td>
                                            <input type="checkbox" data-toggle="toggle" data-on="Active"
                                                class="status-update" <?php echo e($user->status == 1 ? 'checked' : ''); ?>

                                                data-off="Inactive" data-onstyle="success" data-offstyle="danger"
                                                data-id="<?php echo e($user->id); ?>" data-model="User">
                                        </td>
                                        <td class="table_data_style_right">
                                            <?php if(check_permission('user.edit')): ?>
                                                <a href="<?php echo e(route('user.edit', $user->id)); ?>"
                                                    class="btn btn-primary-rgba">
                                                    <i class="feather icon-edit"></i>
                                                </a>
                                            <?php endif; ?>
                                        </td>
                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
        </div>
    </div>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('backend.layouts.master', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/fastitco/nvs.fastit.com.bd/resources/views/backend/pages/user/index.blade.php ENDPATH**/ ?>