Document model attachment column typo
This commit is contained in:
parent
890398e9c5
commit
6b81049908
@ -276,9 +276,11 @@ class Document extends Model
|
|||||||
*/
|
*/
|
||||||
public function getAttachmentAttribute($value = null)
|
public function getAttachmentAttribute($value = null)
|
||||||
{
|
{
|
||||||
if (!empty($value) && !$this->hasMedia('attachment')) {
|
$has_attachment = $this->hasMedia('attachment');
|
||||||
|
|
||||||
|
if (! empty($value) && ! $has_attachment) {
|
||||||
return $value;
|
return $value;
|
||||||
} elseif (!$this->hasMedia('attachment')) {
|
} elseif (! $has_attachment) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user