@props([ 'label' => '', 'name' => '', 'feedback' => null, 'disabled' => false, ]) @php($name = $attributes->whereStartsWith('wire:model')->first() ?? $name)
has('x-show')) x-show="{{ $attributes->get('x-show') }}" x-cloak @endif> @isset($label) @endisset merge([ 'class' => 'form-control'.($errors->has($name) ? ' is-invalid' : ''), 'name' => $name, 'disabled' => $disabled, 'id' => $attributes->has('id') ? $attributes->get('id') : $name, 'placeholder' => $attributes->has('placeholder') ? $attributes->get('placeholder') : $label, 'x-bind:class' => $feedback ? "{'is-invalid': feedback?.$name}" : false, ]) }} /> @if ($feedback) @elseif ($errors->has($name)) {{ $errors->first($name) }} @endif