@props(['name', 'value'=>null, 'label'=>'' , 'class'=>'' ]) @php $invalidClass =$errors->has(dotted_string($name)) ? 'is-invalid' : ''; $splitAttributes = explode(' ',$attributes); $properties = [ 'class'=>"{$invalidClass} custom-control-input {$class}" , ...$splitAttributes, 'id'=>'toggle_'.dotted_string($name) ]; $value ??= data_get(Form::getModel(),dotted_string($name)) @endphp
{!! Form::checkbox($name,1,(int)$value === 1,$properties) !!} @error(dotted_string($name))
{{ $message }}
@enderror