@php # test[0][title] transform to test.0.title $transformedName = preg_replace('/\[(.*)\]/mU', '.$1', $params->name); @endphp @props([ 'label' => isset($params->label) && str_starts_with($params->label,'cms.') ? trans($params->label) : $params->label ?? '', 'name' => $params->name ?? '', 'value' => $params->value ?? old($transformedName) ?? '', 'required' => isset($params->required) ? 'required' : '', 'info' => isset($params->info) && str_starts_with($params->info,'cms.') ? trans($params->info) : $params->info ?? false, 'hasError' => $errors->has($transformedName) ? 'is-invalid' : '', 'class' => $params->class ?? '', 'style' => $params->view, ]) @if($style == 'horizontal')