mirror of
https://github.com/openclassify/openclassify.git
synced 2026-01-11 18:01:10 -06:00
#4857 add video in ad-detail slider for emlak24
This commit is contained in:
parent
555616ea98
commit
494f9defc0
@ -28,6 +28,7 @@ class AdvModel extends AdvsAdvsEntryModel implements AdvInterface
|
||||
'currency_standard_price',
|
||||
'category2',
|
||||
'thumbnail',
|
||||
'video',
|
||||
];
|
||||
|
||||
protected $cascades = [
|
||||
@ -82,9 +83,24 @@ class AdvModel extends AdvsAdvsEntryModel implements AdvInterface
|
||||
{
|
||||
if ($this->cover_photo == null) {
|
||||
return $this->dispatch(new MakeImageInstance('visiosoft.theme.base::images/no-image.png', 'img'))->url();
|
||||
} else {
|
||||
return url($this->cover_photo);
|
||||
}
|
||||
|
||||
return url($this->cover_photo);
|
||||
}
|
||||
|
||||
public function getVideoAttribute()
|
||||
{
|
||||
if (is_module_installed('visiosoft.module.cloudinary')) {
|
||||
$url = app('Visiosoft\CloudinaryModule\Http\Controller\VideoController')->getVideoUrl($this->id);
|
||||
$thumbnail = str_replace('mp4', 'jpg', $url);
|
||||
|
||||
return [
|
||||
'url' => $url,
|
||||
'thumbnail' => $thumbnail,
|
||||
];
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public function getTransNameAttribute()
|
||||
|
||||
Loading…
Reference in New Issue
Block a user