@props(['name', 'label' => null, 'type' => 'text', 'value' => null, 'hint' => null, 'bag' => 'default']) @php($id = $attributes->get('id', $name)) @php($key = str_replace(['[', ']'], ['.', ''], $name)) {{-- errors and old input use dot keys --}}
@if ($label) @endif except('id')->class(['form-control', '!border-red-500' => $errors->getBag($bag)->has($key)]) }}> @if ($hint)

{{ $hint }}

@endif @error($key, $bag)

{{ $message }}

@enderror