@if (isset($value) && isset($checked) == false) @php $checked = $value == 'true'; @endphp @endif @php $rand = rand(1, 999); if (session()->hasOldInput()) { $__oldName = str_ends_with($name, '[]') ? substr($name, 0, -2) : $name; $__old = session()->getOldInput($__oldName); $checked = is_array($__old) ? in_array((string) ($value ?? 'true'), array_map('strval', $__old), true) : $__old !== null && in_array((string) $__old, ['true', '1', 'on'], true); } $__checkboxId = preg_replace('/[^a-zA-Z0-9_-]/', '-', $name).$rand; @endphp
$value){{$key}}="{{$value}}" @endforeach > @if ($label) @endif @if ($errors->has($name))
{{ $errors->first($name) }}
@endif