@props([ 'name', 'label' => null, 'type' => 'text', 'value' => null, 'required' => false, 'disabled' => false, 'readonly' => false, 'help' => null, ]) @php $fieldKey = trim( preg_replace('/\[([^\]]*)\]/', '.$1', $name), '.' ); $inputId = $attributes->get('id', $name); $inputAttributes = $attributes->except('id'); $hasError = $errors->has($fieldKey); $errorId = $inputId . '-error'; $helpId = $inputId . '-help'; $describedBy = $hasError ? $errorId : ($help ? $helpId : null); @endphp
@if ($label) @endif class([ 'ui-input', 'ui-input-error' => $hasError, ]) }} > @error($fieldKey) @enderror @if ($help && !$hasError)

{{ $help }}

@endif