<?php $__env->startSection('content'); ?>
<div class="panel panel-default">
    <div class="panel-heading">Roles - Create</div>

    <div class="panel-body">
        <form action="<?php echo e(url('settings/roles')); ?>" method="POST">
            <?php echo e(csrf_field()); ?>


            <div class="form-group">
                <label for="name">Name</label>
                <input type="text" class="form-control" id="name" name="name" value="<?php echo e(old('name')); ?>">
            </div>

            <div class="form-group">
                <label for="description">Description</label>
                <textarea class="form-control" id="description" name="description"><?php echo e(old('description')); ?></textarea>
            </div>

            <div class="form-group">
                <label for="permission_ids">Permissions</label>
                <div class="row">
                <?php $__currentLoopData = $permissions; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $object => $controller): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                    <div class="col-md-3">
                        <h5><strong><?php echo e($object); ?></strong></h5>
                        <?php $__currentLoopData = $controller; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $permission): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                        <div class="checkbox">
                            <label><input type="checkbox" value="<?php echo e($permission->id); ?>" name="permission_ids[]" <?php echo e(!in_array($permission->id, old('permission_ids', [])) ?: 'checked="true"'); ?>> <?php echo e($permission->action); ?></label>
                        </div>
                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                    </div>
                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                </div>
            </div>

            <div class="form-group">
                <button type="submit" class="btn btn-primary">Save</button>
                <a class="btn btn-link" href="<?php echo e(url('settings/roles')); ?>">Cancel</a>
            </div>
        </form>
    </div>
</div>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('layouts.setting', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>