@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) }}
{{ $errors->first($name) }} @endforeach