<?php $__env->startSection('content'); ?>
<?php echo $__env->make('layouts.sidebar', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>

<div class="content-wrapper">
    <section class="content-header">
        <div class="container-fluid">
            <div class="row mb-2">
                <div class="col-sm-6">
                    <h1>Update User</h1>
                </div>
                <div class="col-sm-6">
                    <ol class="breadcrumb float-sm-right">
                        <li class="breadcrumb-item"><a href="<?php echo e(route('home')); ?>">Home</a></li>
                        <li class="breadcrumb-item active">Users</li>
                    </ol>
                </div>
            </div>
        </div>
    </section>

    <section class="content">
        <div class="container-fluid">
            <div class="row">
                <div class="col-md col-sm">

                    <div class="card card-success">
                        <div class="card-header">
                            <h3 class="card-title">Update User</h3>
                        </div>
                        <form method="POST" action="<?php echo e(route('users.update', [$user->id])); ?>">
                            <?php echo csrf_field(); ?>
                            <div class="card-body">

                                <div class="row">
                                    <div class="col-md col-sm mb-2">
                                        <label for="name">Name</label>
                                        <input type="text" class="form-control" name="name" value="<?php echo e($user->name); ?>" placeholder="Name" required>
                                    </div>
                                    <div class="col-md col-sm mb-2">
                                        <label for="email">Email</label>
                                        <input type="email" class="form-control" name="email" value="<?php echo e($user->email); ?>" placeholder="Email" required>
                                    </div>
                                    <div class="col-md col-sm mb-2">
                                        <label for="password">Password</label>
                                        <input type="password" class="form-control" name="password" placeholder="Password">
                                    </div>
                                </div>
                                <div class="row">
                                    <div class="col-md col-sm mb-2">
                                        <label for="phone">Phone</label>
                                        <input type="number" class="form-control" name="phone" value="<?php echo e($user->phone); ?>" placeholder="Phone Number">
                                    </div>
                                    <div class="col-md col-sm mb-2">
                                        <label for="address">Address</label>
                                        <input type="text" class="form-control" name="address" value="<?php echo e($user->address); ?>" placeholder="Address">
                                    </div>
                                    <div class="col-md col-sm mb-2">
                                        <label for="status">Status</label>
                                        <select name="status" class="form-control">
                                            <option disabled <?php echo e(empty($user->status) ? 'selected' : ''); ?>>--Select One--</option>
                                            <option value="active" <?php echo e($user->status == 'active' ? 'selected' : ''); ?>>Active</option>
                                            <option value="inactive" <?php echo e($user->status == 'inactive' ? 'selected' : ''); ?>>Inactive</option>
                                        </select>
                                    </div>
                                </div>
                                <div class="row">
                                <?php if(Auth::id() !== $user->id): ?>
                                    <div class="col-md col-sm mb-2">
                                        <label for="role_id">Role</label>
                                        <select name="role_id" id="role_id" class="form-control">
                                            <option disabled <?php echo e(empty($user->role_id) ? 'selected' : ''); ?>>--Select One--</option>
                                            <?php $__currentLoopData = $roles; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $role): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                            <option value="<?php echo e($role->id); ?>" <?php echo e($user->role_id == $role->id ? 'selected' : ''); ?>>
                                                <?php echo e($role->name); ?>

                                            </option>
                                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                        </select>
                                    </div>
                                    <?php endif; ?>
                                    <div class="col-md col-sm mb-2">
                                    </div>
                                    <div class="col-md col-sm mb-2">
                                    </div>
                                </div>
                            </div>

                            <div class="card-footer">
                                <button type="submit" class="btn btn-success">Submit</button>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </section>
</div>

<?php echo $__env->make('layouts.footer', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
<aside class="control-sidebar control-sidebar-dark">
</aside>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /Users/muhammadajmal/Documents/www/nes/resources/views/users/edit.blade.php ENDPATH**/ ?>