cloudinary refactored

This commit is contained in:
vedatakd 2021-04-15 14:50:30 +03:00
parent fd34b69481
commit b17573e257
2 changed files with 5 additions and 2 deletions

View File

@ -208,7 +208,7 @@
</div>
</div>
</div>
{% set other_fields = addBlock('new-ad/other-fields',{'custom_fields':custom_fields}) %}
{% set other_fields = addBlock('new-ad/other-fields',{'custom_fields':custom_fields,'id':id}) %}
{% if other_fields or (custom_fields and count(custom_fields)) %}
<h5 class="mt-5 pb-1 border-bottom">
{{ trans('visiosoft.module.advs::field.additional_fields') }}

View File

@ -536,6 +536,9 @@ class AdvsController extends PublicController
}
$adv->video_url = null;
if ($this->adv_model->is_enabled('cloudinary')) {
$adv->video_url = app('Visiosoft\CloudinaryModule\Http\Controller\VideoController')->getVideoUrl($adv->id);
}
$options = $this->optionRepository->findAllBy('adv_id', $id);
@ -846,7 +849,7 @@ class AdvsController extends PublicController
$this->event->dispatch(new PriceChange($post));
//Cover Image URL
if ($this->request->url == "") {
if ($this->request->video_url == "") {
$this->adv_repository->cover_image_update($adv);
}