Document model attachment column typo

This commit is contained in:
Cüneyt Şentürk 2023-07-21 12:15:06 +03:00
parent 890398e9c5
commit 6b81049908

View File

@ -276,9 +276,11 @@ class Document extends Model
*/
public function getAttachmentAttribute($value = null)
{
if (!empty($value) && !$this->hasMedia('attachment')) {
$has_attachment = $this->hasMedia('attachment');
if (! empty($value) && ! $has_attachment) {
return $value;
} elseif (!$this->hasMedia('attachment')) {
} elseif (! $has_attachment) {
return false;
}