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


<div class="card">

    <div class="card-body">
        <form action="<?php echo e(route('permissionUpdate',$role->id)); ?>" method="POST">
            <?php echo method_field('PUT'); ?>
            <?php echo csrf_field(); ?>

            
            <h2 class="page-header">Role Name :
              
                <?php echo e($role->name); ?></h2>

                
                <div class="">
                <table class="table table-border table-striped">
                  

                  <input type="hidden" name="name" value="<?php echo e($role->name); ?>">
                  <input type="hidden" name="id" value="<?php echo e($role->id); ?>">
                  <div class="row">

                 
                  <?php $__currentLoopData = $permisssions; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $p): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>

                  <div class="col-md-3">
                   
                    <div class="form-group" style="padding-top:15px;display:inline-block">
                      <div class="custom-control custom-switch">
                        
                        
                        <input class="pcheck custom-control-input" id="permission<?php echo e($p->id); ?>" name="permissions[]" type="checkbox" value="<?php echo e($p->id); ?>"
                        <?php if( $role->hasPermissionTo($p->id)): ?>
                        <?php echo e('checked'); ?>

                        <?php endif; ?>
                        >
                        <label class="custom-control-label" for="permission<?php echo e($p->id); ?>"></label>
                      </div>
                      
                    </div>
                    <span style="margin-left:90px">
                      (<?php echo e($p->id); ?>) <?php echo e($p->name); ?>

                    </span>

                  </div>

                  
                  
                  <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                </div>

                </table>
                </div>

           



            <div class="form-group">
                <a href="<?php echo e(route('roles.index')); ?>" class="btn btn-default"><i class="fa fa-arrow-left"></i> Back</a>
                <input type="submit" class="btn btn-primary float-right"
                value="Assign Permission">
            </div>


        </form>
    </div>
</div>



<?php $__env->stopSection(); ?>

<?php echo $__env->make('layout.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /var/www/html/spacewalker/radius-circle/resources/views/role/assignPermission.blade.php ENDPATH**/ ?>