added company model boot function try catch..
This commit is contained in:
parent
2fa5b599a2
commit
48fb23bb50
@ -286,6 +286,7 @@ class Company extends Eloquent implements Ownable
|
|||||||
|
|
||||||
public function setCommonSettingsAsAttributes()
|
public function setCommonSettingsAsAttributes()
|
||||||
{
|
{
|
||||||
|
try { // TODO will optimize..
|
||||||
$settings = $this->settings;
|
$settings = $this->settings;
|
||||||
|
|
||||||
$groups = [
|
$groups = [
|
||||||
@ -314,10 +315,14 @@ class Company extends Eloquent implements Ownable
|
|||||||
if ($this->getAttribute('logo') == '') {
|
if ($this->getAttribute('logo') == '') {
|
||||||
$this->setAttribute('logo', 'public/img/company.png');
|
$this->setAttribute('logo', 'public/img/company.png');
|
||||||
}
|
}
|
||||||
|
} catch(\Throwable $e) {
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function unsetCommonSettingsFromAttributes()
|
public function unsetCommonSettingsFromAttributes()
|
||||||
{
|
{
|
||||||
|
try { // TODO will optimize..
|
||||||
$settings = $this->settings;
|
$settings = $this->settings;
|
||||||
|
|
||||||
$groups = [
|
$groups = [
|
||||||
@ -337,6 +342,9 @@ class Company extends Eloquent implements Ownable
|
|||||||
}
|
}
|
||||||
|
|
||||||
$this->offsetUnset('logo');
|
$this->offsetUnset('logo');
|
||||||
|
} catch(\Throwable $e) {
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user