        <div class="col-12 grid-margin stretch-card">
            <div class="card">
                <div class="card-body">
                    <h4 class="card-title">Permissions</h4>
                    <div class="row">
                        <div class="col-12">
                            <div class="form-group row">
                                <?php
                                    $rolePermission = isset($role) ? $role->permissions()->pluck('permission_id','permission_id') : []; 
                                ?>                                
                                <?php $__empty_1 = true; $__currentLoopData = $permissions; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $index => $groupPermissions): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
                                    <div class="col-md-3 mb-3">
                                        <div class="card border-primary">
                                            <div class="card-header">
                                                <div class="">
                                                    <label class="form-check-label">
                                                        <input type="checkbox" onclick="checkAll(this,'.card')">
                                                        <?php echo e($index); ?>                                                        
                                                    </label>
                                                </div>                                            
                                            </div>
                                            <div class="card-body">
                                            <?php $__currentLoopData = $groupPermissions; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                <div class="form-check">
                                                    <label class="form-check-label">
                                                        <input type="checkbox" name="permissions[]" <?php if(isset($rolePermission[$item->id])): ?> checked <?php endif; ?> value="<?php echo e($item->name); ?>" class="form-check-input">
                                                        <?php echo e($item->name); ?>

                                                        <i class="input-helper"></i>
                                                    </label>
                                                </div>
                                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                            </div>
                                        </div>
                                    </div>
                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
                                    ----
                                <?php endif; ?>                 
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <script>
            function checkAll(elm, parent){
                const _checked = $(elm).is(':checked') ? 1 : 0                
                $(elm).closest(parent).find(':checkbox').not(elm).prop('checked', _checked)
            }
        </script><?php /**PATH /data/docker/laravel/iclock/resources/views/base/roles/permission_fields.blade.php ENDPATH**/ ?>