@props([ 'name', 'type' => 'text', 'label' => '', 'class' => '', 'yesLabel' => __('Yes'), 'noLabel' => __('No'), 'yesValue' => 1, 'noValue' => 0, 'checked' => null, 'star' => false, ]) @php $invalidClass = $errors->has(dotted_string($name)) ? 'is-invalid' : ''; $splitAttributes = explode(' ', $attributes); $defaultPlaceHolder = __('Enter :name', ['name' => $label]); $properties = [ 'class' => "{$invalidClass} {$class} " . ($type == 'textarea' ?: 'form-control'), 'placeholder' => $defaultPlaceHolder, ...$splitAttributes, ]; @endphp
@error(dotted_string($name))
{{ $message }}
@enderror