company model boot optimize

This commit is contained in:
Cüneyt Şentürk 2022-03-02 17:43:54 +03:00
parent b59f4006ed
commit 2fa5b599a2

View File

@ -81,6 +81,7 @@ class Company extends Eloquent implements Ownable
{
parent::boot();
try { // TODO will optimize..
static::retrieved(function($model) {
$model->setCommonSettingsAsAttributes();
});
@ -88,6 +89,9 @@ class Company extends Eloquent implements Ownable
static::saving(function($model) {
$model->unsetCommonSettingsFromAttributes();
});
} catch(\Throwable $e) {
}
}
public function documents()