@props([ 'name', 'label', 'required' => false, 'placeholder' => null, 'helpText' => null, ]) @php $changed = ! $this->isOriginalValue($name); $existingValue = $this->customer->current_data[$name] ?? ''; $hasError = $errors->has('current_data.' . $name); $placeholderText = filled($existingValue) ? $existingValue : $placeholder; $fieldId = 'field-' . $name; $errorId = $fieldId . '-error'; $helpId = $fieldId . '-help'; @endphp
{{ $helpText }}
@endif $hasError, '' => $changed && ! $hasError, ]) > @error('current_data.' . $name){{ $message }}
@enderror