@props([ 'name', 'label' => null, 'checked' => false, 'hint' => null, ]) @php $id = $attributes->get('id', $name); // old() returns null on a first render but '' after a failed submit where the // box was cleared, so distinguish the two rather than falling back blindly. $isChecked = old() ? (bool) old($name) : (bool) $checked; @endphp
{{ $message }}
@enderror