mirror of
https://github.com/devcode-it/openstamanager.git
synced 2025-01-27 14:09:41 +01:00
Fix di forma
This commit is contained in:
parent
a5c8bdf718
commit
0294d0aa87
@ -359,7 +359,9 @@ class Articolo extends Model
|
|||||||
*/
|
*/
|
||||||
public function setNameAttribute($value)
|
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_record', '=', $this->id)
|
||||||
->where('id_lang', '=', setting('Lingua'));
|
->where('id_lang', '=', setting('Lingua'));
|
||||||
|
|
||||||
@ -368,7 +370,7 @@ class Articolo extends Model
|
|||||||
'name' => $value
|
'name' => $value
|
||||||
]);
|
]);
|
||||||
} else {
|
} else {
|
||||||
$translated->insert([
|
$table->insert([
|
||||||
'id_record' => $this->id,
|
'id_record' => $this->id,
|
||||||
'id_lang' => setting('Lingua'),
|
'id_lang' => setting('Lingua'),
|
||||||
'name' => $value
|
'name' => $value
|
||||||
|
Loading…
x
Reference in New Issue
Block a user