@props([ 'type' => 'text', 'class' => '', 'showChoose' => true ]) @if(isset($attributes['error']) and !empty($attributes['error'])) @error($attributes['error']) @php $class .= ' is-invalid'; @endphp @enderror @endif @php( $attributes = $attributes->merge(['class' => "form-control init-select2 $class", 'type' => $type]) ) @if(isset($attributes['error']) and !empty($attributes['error'])) @endif