I have a configuration table in my database that has the following fields: ["id", "texto", "textoOriginal"]
.
Initially the values of the texto
field are equal to the textoOriginal
field, but the user can at any given time change the value of the texto
field.
I need to create a method that the user can reset the original values of the parameters, so I need to run this query:
UPDATE parametros SET texto = textoOriginal
But I wanted to do this through the Query Builder syntax , it turns out that Laravel updates the texto
field with the string " OriginalType " .
I'm doing this:
$this->update(['texto' => 'parametros.textoOriginal']);
Does anyone know how to do this?