<?php $__env->startSection('content'); ?>
    <div class="content-wrapper">
        <!-- Content -->
        <div class="container-xxl flex-grow-1 container-p-y">
            <div class="d-flex justify-content-between">
                <nav aria-label="breadcrumb">
                    <ol class="breadcrumb breadcrumb-style2 mb-0">
                        <li class="breadcrumb-item">
                            <a href="<?php echo e(url('dashboard')); ?>">Home</a>
                        </li>
                        <li class="breadcrumb-item">
                            <a href="<?php echo e(url('roles')); ?>">Roles</a>
                        </li>
                        <li class="breadcrumb-item active">Update Role</li>
                    </ol>
                </nav>
            </div>
            <div class="row">
                <div class="col-md-12">
                    <div class="my-5">
                        <div class="col-xxl">
                            <div class="card mb-4">
                                <div class="card-header">
                                    <h5 class="mb-0">Update role details</h5>
                                </div>
                                <div class="card-body">
                                    <form action="<?php echo e(route('updaterole')); ?>" method="POST">
                                        <?php echo csrf_field(); ?>
                                        <input type="hidden" name="role_id" value="<?php echo e($role->id); ?>">
                                        <div class="row mb-3">
                                            <label class="col-sm-2 col-form-label" for="basic-default-name">Role
                                                Name</label>
                                            <div class="col-sm-10">
                                                <input type="text" name="role_name" class="form-control"
                                                    value="<?php echo e($role->name); ?>" id="basic-default-name"
                                                    placeholder="Enter role Name" />
                                            </div>
                                        </div>
                                        <div class="row">
                                            <label for="" class="col-sm-2 col-form-label">
                                                Permissions
                                            </label>
                                            <div class="col-md-10">
                                                <div class="d-flex gap-3">
                                                    <?php
                                                        $ids = $role->permissions->pluck('id')->toArray();
                                                    ?>
                                                    <?php $__currentLoopData = $permissions; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $permission): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                        <div class="form-check  mt-1">
                                                            <input class="form-check-input" type="checkbox"
                                                                value="<?php echo e($permission->id); ?>" id="defaultCheck1"
                                                                name="permissions[]"
                                                                <?php if(in_array($permission->id, $ids)): ?> checked <?php endif; ?>>
                                                            <label class="form-check-label" for="defaultCheck1">
                                                                <?php echo e($permission->name); ?>

                                                            </label>
                                                        </div>
                                                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="row justify-content-end">
                                            <div class="col-sm-10">
                                                <button type="submit" class="btn btn-primary">Save</button>
                                            </div>
                                        </div>
                                    </form>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <!-- / Content -->
        <div class="content-backdrop fade"></div>
    </div>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.main', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH C:\xampp_new\htdocs\pop\resources\views/edit_role.blade.php ENDPATH**/ ?>