@props([ 'name', // dot notation, e.g. seo.meta_title 'label' => null, 'type' => 'text', 'value' => null, 'required' => false, 'help' => null, 'id' => null, ]) @php $id ??= 'f-'.str_replace('.', '-', $name); $htmlName = preg_replace('/\.([^.]+)/', '[$1]', $name); $current = $type === 'password' || $type === 'file' ? null : old($name, $value); @endphp
@if ($label) @endif class(['form-control', 'is-invalid' => $errors->has($name)]) }}> @error($name)
{{ $message }}
@enderror @if ($help){{ $help }}@endif