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

{{ $help }}

@endif