Update Media model, fix url methods

This commit is contained in:
Daniel Supernault 2021-01-19 19:40:41 -07:00
parent 6b411d23b5
commit 4a70e18596
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7

View file

@ -29,10 +29,6 @@ class Media extends Model
public function url()
{
if($this->mime === 'video/mp4') {
return url(Storage::url($this->thumbnail_path ?? 'public/no-preview.png'));
}
if($this->cdn_url) {
return $this->cdn_url;
}
@ -46,10 +42,6 @@ class Media extends Model
public function thumbnailUrl()
{
if($this->mime === 'video/mp4') {
return url(Storage::url($this->thumbnail_path ?? 'public/no-preview.png'));
}
if($this->thumbnail_url) {
return $this->thumbnail_url;
}