Skip to content

Commit

Permalink
fixed relationship conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
denisdulici committed May 30, 2021
1 parent 81fd6be commit 067f7e5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions app/Models/Common/Company.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,11 @@ public static function boot()
parent::boot();

static::retrieved(function($model) {
$model->setSettings();
$model->setCommonSettingsAsAttributes();
});

static::saving(function($model) {
$model->unsetSettings();
$model->unsetCommonSettingsFromAttributes();
});
}

Expand Down Expand Up @@ -267,7 +267,7 @@ public function widgets()
return $this->hasMany('App\Models\Common\Widget');
}

public function setSettings()
public function setCommonSettingsAsAttributes()
{
$settings = $this->settings;

Expand Down Expand Up @@ -299,7 +299,7 @@ public function setSettings()
}
}

public function unsetSettings()
public function unsetCommonSettingsFromAttributes()
{
$settings = $this->settings;

Expand Down

0 comments on commit 067f7e5

Please sign in to comment.