refs #164 models update

This commit is contained in:
Cüneyt Şentürk
2018-01-10 18:21:12 +03:00
parent e65743c7c3
commit 87b327d9b8
11 changed files with 70 additions and 48 deletions

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}