1
0
mirror of https://github.com/devcode-it/openstamanager.git synced 2024-12-25 06:55:05 +01:00

Fix di forma

This commit is contained in:
FabioL 2024-03-07 09:27:22 +01:00
parent a5c8bdf718
commit 0294d0aa87

View File

@ -359,7 +359,9 @@ class Articolo extends Model
*/
public function setNameAttribute($value)
{
$translated = database()->table($this->table.'_lang')
$table = database()->table($this->table.'_lang');
$translated = $table
->where('id_record', '=', $this->id)
->where('id_lang', '=', setting('Lingua'));
@ -368,7 +370,7 @@ class Articolo extends Model
'name' => $value
]);
} else {
$translated->insert([
$table->insert([
'id_record' => $this->id,
'id_lang' => setting('Lingua'),
'name' => $value