refs #164 models update
This commit is contained in:
@ -88,11 +88,9 @@ class User extends Authenticatable
|
||||
}
|
||||
}
|
||||
|
||||
if (!empty($value)) {
|
||||
if (!empty($value) && !$this->hasMedia('picture')) {
|
||||
return $value;
|
||||
}
|
||||
|
||||
if (!$this->hasMedia('picture')) {
|
||||
} elseif (!$this->hasMedia('picture')) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -238,11 +238,9 @@ class Company extends Eloquent
|
||||
*/
|
||||
public function getCompanyLogoAttribute($value)
|
||||
{
|
||||
if (!empty($value)) {
|
||||
if (!empty($value) && !$this->hasMedia('company_logo')) {
|
||||
return $value;
|
||||
}
|
||||
|
||||
if (!$this->hasMedia('company_logo')) {
|
||||
} elseif (!$this->hasMedia('company_logo')) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -137,11 +137,9 @@ class Bill extends Model
|
||||
*/
|
||||
public function getAttachmentAttribute($value)
|
||||
{
|
||||
if (!empty($value)) {
|
||||
if (!empty($value) && !$this->hasMedia('attachment')) {
|
||||
return $value;
|
||||
}
|
||||
|
||||
if (!$this->hasMedia('attachment')) {
|
||||
} elseif (!$this->hasMedia('attachment')) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -87,11 +87,9 @@ class BillPayment extends Model
|
||||
*/
|
||||
public function getAttachmentAttribute($value)
|
||||
{
|
||||
if (!empty($value)) {
|
||||
if (!empty($value) && !$this->hasMedia('attachment')) {
|
||||
return $value;
|
||||
}
|
||||
|
||||
if (!$this->hasMedia('attachment')) {
|
||||
} elseif (!$this->hasMedia('attachment')) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -100,11 +100,9 @@ class Payment extends Model
|
||||
*/
|
||||
public function getAttachmentAttribute($value)
|
||||
{
|
||||
if (!empty($value)) {
|
||||
if (!empty($value) && !$this->hasMedia('attachment')) {
|
||||
return $value;
|
||||
}
|
||||
|
||||
if (!$this->hasMedia('attachment')) {
|
||||
} elseif (!$this->hasMedia('attachment')) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -146,11 +146,9 @@ class Invoice extends Model
|
||||
*/
|
||||
public function getAttachmentAttribute($value)
|
||||
{
|
||||
if (!empty($value)) {
|
||||
if (!empty($value) && !$this->hasMedia('attachment')) {
|
||||
return $value;
|
||||
}
|
||||
|
||||
if (!$this->hasMedia('attachment')) {
|
||||
} elseif (!$this->hasMedia('attachment')) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -87,11 +87,9 @@ class InvoicePayment extends Model
|
||||
*/
|
||||
public function getAttachmentAttribute($value)
|
||||
{
|
||||
if (!empty($value)) {
|
||||
if (!empty($value) && !$this->hasMedia('attachment')) {
|
||||
return $value;
|
||||
}
|
||||
|
||||
if (!$this->hasMedia('attachment')) {
|
||||
} elseif (!$this->hasMedia('attachment')) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -106,11 +106,9 @@ class Revenue extends Model
|
||||
*/
|
||||
public function getAttachmentAttribute($value)
|
||||
{
|
||||
if (!empty($value)) {
|
||||
if (!empty($value) && !$this->hasMedia('attachment')) {
|
||||
return $value;
|
||||
}
|
||||
|
||||
if (!$this->hasMedia('attachment')) {
|
||||
} elseif (!$this->hasMedia('attachment')) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -120,11 +120,9 @@ class Item extends Model
|
||||
*/
|
||||
public function getPictureAttribute($value)
|
||||
{
|
||||
if (!empty($value)) {
|
||||
if (!empty($value) && !$this->hasMedia('picture')) {
|
||||
return $value;
|
||||
}
|
||||
|
||||
if (!$this->hasMedia('picture')) {
|
||||
} elseif (!$this->hasMedia('picture')) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -10,6 +10,8 @@ class Setting extends Model
|
||||
|
||||
protected $table = 'settings';
|
||||
|
||||
public $timestamps = false;
|
||||
|
||||
/**
|
||||
* Attributes that should be mass-assignable.
|
||||
*
|
||||
|
Reference in New Issue
Block a user