@foreach ($permission as $value) {{-- {!! Form::label('permission', $value->name) !!}--}} @if(isset($role)) {!! Form::checkbox('permission[]', $value->id,in_array($value->id, $rolePermissions) ? true : false) !!} @else {!! Form::checkbox('permission[]', $value->id, null) !!} @endif @endforeach