laravel-admin/resources/views/form/radio.blade.php
2022-09-21 11:59:53 +08:00

21 lines
837 B
PHP

<div class="{{$viewClass['form-group']}} {!! !$errors->has($errorKey) ? '' : 'has-error' !!}">
<label for="{{$id}}" class="{{$viewClass['label']}} control-label">{{$label}}</label>
<div class="{{$viewClass['field']}}">
@include('admin::form.error')
@foreach($options as $option => $label)
@if(!$inline)<div class="radio">@endif
<label @if($inline)class="radio-inline"@endif>
<input type="radio" name="{{$name}}" value="{{$option}}" class="minimal {{$class}}" {{ ($option == old($column, $value)) || ($value === null && in_array($label, $checked)) ?'checked':'' }} {!! $attributes !!} />&nbsp;{{$label}}&nbsp;&nbsp;
</label>
@if(!$inline)</div>@endif
@endforeach
@include('admin::form.help-block')
</div>
</div>