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

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