From 067f7e563517faedeb34cd6c6e194f25cf55c813 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Denis=20Duli=C3=A7i?= Date: Sun, 30 May 2021 20:51:14 +0300 Subject: [PATCH] fixed relationship conflict --- app/Models/Common/Company.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/Models/Common/Company.php b/app/Models/Common/Company.php index 02dc23332..b647f7255 100644 --- a/app/Models/Common/Company.php +++ b/app/Models/Common/Company.php @@ -74,11 +74,11 @@ class Company extends Eloquent parent::boot(); static::retrieved(function($model) { - $model->setSettings(); + $model->setCommonSettingsAsAttributes(); }); static::saving(function($model) { - $model->unsetSettings(); + $model->unsetCommonSettingsFromAttributes(); }); } @@ -267,7 +267,7 @@ class Company extends Eloquent return $this->hasMany('App\Models\Common\Widget'); } - public function setSettings() + public function setCommonSettingsAsAttributes() { $settings = $this->settings; @@ -299,7 +299,7 @@ class Company extends Eloquent } } - public function unsetSettings() + public function unsetCommonSettingsFromAttributes() { $settings = $this->settings;