checkbox.blade.php 846 B

12345678910111213141516171819202122
  1. <div class="{{$viewClass['form-group']}} {!! !$errors->has($column) ?: 'has-error' !!}">
  2. <label for="{{$id}}" class="{{$viewClass['label']}} control-label">{{$label}}</label>
  3. <div class="{{$viewClass['field']}}" id="{{$id}}">
  4. @include('admin::form.error')
  5. @foreach($options as $option => $label)
  6. @if(!$inline)<div class="checkbox">@endif
  7. <label @if($inline)class="checkbox-inline"@endif>
  8. <input type="checkbox" name="{{$name}}[]" value="{{$option}}" class="{{$class}}" {{ in_array($option, (array)old($column, $value))?'checked':'' }} {!! $attributes !!} />&nbsp;{{$label}}&nbsp;&nbsp;
  9. </label>
  10. @if(!$inline)</div>@endif
  11. @endforeach
  12. <input type="hidden" name="{{$name}}[]">
  13. @include('admin::form.help-block')
  14. </div>
  15. </div>