{{-- A group of checkboxes for one array property, in a fieldset whose legend names the group. Native inputs with wrapping labels, so every box has a name; the validation error is announced with the group. $options: list of ['value' => ..., 'label' => ..., 'note' => ?string]. --}} @props([ 'legend', 'model', 'options', 'hint' => null, 'columns' => true, ]) @php $errorKey = $model; $id = 'group-'.str_replace('.', '-', $model); @endphp
class('space-y-2') }} @if ($hint !== null || $errors->has($errorKey)) aria-describedby="{{ trim(($hint !== null ? $id.'-hint ' : '').($errors->has($errorKey) ? $id.'-error' : '')) }}" @endif > {{ $legend }} @if ($hint !== null)

{{ $hint }}

@endif
$columns])> @foreach ($options as $option) @endforeach
@error($errorKey)

{{ $message }}

@enderror