@php $fieldLabel = $field['label']; $fieldName = $field['name']; $fieldDotName = square_brackets_to_dots(implode(',', (array) $fieldName)); $inputId = str()->slug($fieldDotName); $isInvalidClass = optional($errors)->has($fieldDotName) ? 'is-invalid' : ''; $oldValue = old_empty_or_null($fieldName, '') ?? ($field['value'] ?? ($field['default'] ?? '')); @endphp