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



    <!-- begin::main content -->

    <main class="main-content">

        <div class="container">

            <!-- begin::page header -->
            <div class="page-header">
                <h3>Edit User</h3>
                <nav aria-label="breadcrumb">
                    <ol class="breadcrumb">
                        <li class="breadcrumb-item"><a href="<?php echo e(asset('dashboard')); ?>">Dashboard</a></li>
                        <li class="breadcrumb-item" aria-current="page"><a href="<?php echo e(asset('users')); ?>">Users</a></li>
                        <li class="breadcrumb-item active" aria-current="page">Edit</li>
                    </ol>
                </nav>
            </div>
            <!-- end::page header -->

            <div class="row">
                <div class="col-md-6">
                    <?php if (isset($component)) { $__componentOriginal8a5ba9c90b64d384232e9948b1023e746ba08e74 = $component; } ?>
<?php $component = $__env->getContainer()->make(App\View\Components\FlashMessage::class, []); ?>
<?php $component->withName('flashMessage'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php $component->withAttributes([]); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal8a5ba9c90b64d384232e9948b1023e746ba08e74)): ?>
<?php $component = $__componentOriginal8a5ba9c90b64d384232e9948b1023e746ba08e74; ?>
<?php unset($__componentOriginal8a5ba9c90b64d384232e9948b1023e746ba08e74); ?>
<?php endif; ?>
                    <div class="card">
                        <div class="card-body">
                            <a href="<?php echo e(asset('users')); ?>" class="btn text-white btn-primary pull-right"><i
                                class="fa fa-list fa-lg pr-2 text-white"></i>Users</a>
                            <h4 class="card-title">Edit User</h4>
                            <form action="<?php echo e(asset('edit-user/' . $users->id)); ?>" method="post">
                                <?php echo csrf_field(); ?>
                                <div class="form-group">
                                    <label for="name">Username <span class="text-danger">*</span></label>
                                    <input type="text" class="form-control" name="name"
                                        value="<?php echo e(!empty($users->name) ? $users->name : ''); ?>" id="name"
                                        placeholder="Enter  Name">

                                    <?php if($errors->has('name')): ?>
                                        <div class="error">
                                            <?php echo e($errors->first('name')); ?>

                                        </div>
                                    <?php endif; ?>

                                </div>

                                <div class="form-group">
                                    <label for="email">Email <span class="text-danger">*</span></label>
                                    <input type="email" class="form-control" name="email"
                                        value="<?php echo e(!empty($users->email) ? $users->email : ''); ?>" id="email"
                                        placeholder="Enter Email Name">

                                    <?php if($errors->has('email')): ?>
                                        <div class="error">
                                            <?php echo e($errors->first('email')); ?>

                                        </div>
                                    <?php endif; ?>

                                </div>

                                <div class="form-group">
                                    <label for="phone">Mobile (Optional)</label>
                                    <input type="number" class="form-control" name="phone"
                                        value="<?php echo e(!empty($users->phone) ? $users->phone : ''); ?>" id="phone"
                                        placeholder="Enter Phone">

                                    <?php if($errors->has('phone')): ?>
                                        <div class="error">
                                            <?php echo e($errors->first('phone')); ?>

                                        </div>
                                    <?php endif; ?>

                                </div>

                                <div class="form-group">
                                    <label for="roles">Role</label>
                                    <select multiple id="roles" name="role[]">
                                        <?php if(!empty($roles)): ?>
                                            <?php $__currentLoopData = $roles; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $role): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                <option
                                                    <?php echo e($users->roles()->where('slug', $role->slug)->count() > 0? 'selected': ''); ?>

                                                    value="<?php echo e($role->slug); ?>"><?php echo e($role->name); ?></option>
                                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                        <?php endif; ?>
                                    </select>

                                    <?php if($errors->has('role')): ?>
                                        <div class="error">
                                            <?php echo e($errors->first('role')); ?>

                                        </div>
                                    <?php endif; ?>
                                </div>

                                <button type="submit" class="btn btn-primary">Submit</button>
                            </form>
                        </div>
                    </div>



                </div>

            </div>

        </div>

    </main>
    <!-- end::main content -->

<?php $__env->stopSection(); ?>
<?php $__env->startPush('footer-script'); ?>
    <!-- begin::select2 -->
    <link rel="stylesheet" href="<?php echo e(asset('public/admin/vendors/select2/css/select2.min.css')); ?>" type="text/css">
    <script src="<?php echo e(asset('public/admin/vendors/select2/js/select2.min.js')); ?>"></script>
    <!-- end::select2 -->
    <script>
        $(document).ready(function() {
            $('#roles').select2();
        });
    </script>
<?php $__env->stopPush(); ?>

<?php echo $__env->make('layout', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH C:\xampp\htdocs\blurb_erp\resources\views/user/edit-user.blade.php ENDPATH**/ ?>