Attachment file update
This commit is contained in:
14
app/Models/Common/Media.php
Normal file
14
app/Models/Common/Media.php
Normal file
@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\Common;
|
||||
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
use Plank\Mediable\Media as PMedia;
|
||||
|
||||
class Media extends PMedia
|
||||
{
|
||||
use SoftDeletes;
|
||||
|
||||
protected $dates = ['deleted_at'];
|
||||
|
||||
}
|
@ -150,6 +150,6 @@ class Invoice extends Model
|
||||
return false;
|
||||
}
|
||||
|
||||
return $this->getMedia('attachment')->first();
|
||||
return $this->getMedia('attachment')->last();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user