@props([ 'name', 'label', 'type' => 'text', 'value' => null, 'required' => false, 'placeholder' => ' ', ]) @php $id = $attributes->get('id', $name); $hasError = $errors->has($name); $inputClass = 'form-control' . ($hasError ? ' is-invalid' : ''); @endphp