Update value

When I update the registration field it does not update the owner field, it returns a blank value

Forms\Components\Select::make('vehiculos_id')->required()->label('Matricula')
->searchable()
->relationship('vehiculos','matricula')
->afterStateUpdated(function (Set $set) {
$set('partes.vehiculos_id', null);
})
->preload()->live(),
Forms\Components\TextInput::make('partes.vehiculos_id')->label('Propietario')
->formatStateUsing(function ($state, Parte $partes) {
if (!empty($partes->vehiculos->clientes)) {
return $partes->vehiculos->clientes->apellidos . ', ' . $partes->vehiculos->clientes->nombre;
} else {
return null;
}
})
->disabled()->live(),
Was this page helpful?