29 lines
749 B
PHP
29 lines
749 B
PHP
<div class="form-group">
|
|
<label>{{ $label }}</label>
|
|
<div class="form-check row {{ $errors->has($name) ? ' has-error' : '' }}">
|
|
@foreach ($models as $m)
|
|
@php
|
|
if(isset($m->label))
|
|
{
|
|
$modelLabel = $m->label;
|
|
}
|
|
else
|
|
{
|
|
$modelLabel = ucfirst($m->name);
|
|
}
|
|
$checkedValue = null;
|
|
if(isset($checked) && $wizard)
|
|
{
|
|
$checkedValue = $checked;
|
|
}
|
|
@endphp
|
|
@if(count($models) >= 1 && !isset($model))
|
|
{{ Form::checkbox($name.'[]', $m->id, true) }}
|
|
@else
|
|
{{ Form::checkbox($name.'[]', $m->id, $checkedValue, ['id' => $m->name]) }}
|
|
@endif
|
|
{{ Form::label($m->name, $modelLabel) }}<br>
|
|
<small class="text-danger">{{ $errors->first($name) }}</small>
|
|
@endforeach
|
|
</div>
|
|
</div> |