mirror of
https://github.com/openclassify/openclassify.git
synced 2026-01-11 18:01:10 -06:00
ad viewed function
This commit is contained in:
parent
37e007480e
commit
bead0fe594
@ -219,5 +219,11 @@ class VisiosoftModuleAdvsCreateAdvsFields extends Migration
|
||||
'default_value' => 0,
|
||||
]
|
||||
],
|
||||
'count_show_ad' => [
|
||||
'type' => 'anomaly.field_type.integer',
|
||||
'config' => [
|
||||
'default_value' => 0,
|
||||
]
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
@ -70,7 +70,8 @@ class VisiosoftModuleAdvsCreateAdvsStream extends Migration
|
||||
'adv_day',
|
||||
'cf_json',
|
||||
'cover_photo',
|
||||
'count_show_phone'
|
||||
'count_show_phone',
|
||||
'count_show_ad'
|
||||
];
|
||||
|
||||
}
|
||||
|
||||
@ -0,0 +1,9 @@
|
||||
function viewed_ad() {
|
||||
var id = $('#adv-id').val();
|
||||
$.ajax({
|
||||
type: 'get',
|
||||
url: '/ajax/viewed/' + id,
|
||||
});
|
||||
}
|
||||
|
||||
viewed_ad();
|
||||
@ -478,6 +478,7 @@
|
||||
{{ asset_add("scripts.js", "visiosoft.module.advs::js/list-item.js") }}
|
||||
{{ asset_add("scripts.js", "visiosoft.module.advs::js/quantity.js") }}
|
||||
{{ asset_add("scripts.js", "visiosoft.module.advs::js/phoneCounter.js") }}
|
||||
{{ asset_add("scripts.js", "visiosoft.module.advs::js/viewed.js") }}
|
||||
|
||||
{% if entries('advs').isEnabled('comments') %}
|
||||
{{ asset_add("scripts.js", "visiosoft.module.comments::js/ajaxcomment.js") }}
|
||||
|
||||
@ -25,61 +25,66 @@ use Visiosoft\CartsModule\Cart\Command\GetCart;
|
||||
|
||||
class AdvModel extends AdvsAdvsEntryModel implements AdvInterface
|
||||
{
|
||||
public function is_enabled($slug) {
|
||||
public function is_enabled($slug)
|
||||
{
|
||||
$isActive = DB::table('addons_modules')
|
||||
->where('namespace', 'visiosoft.module.'. $slug)
|
||||
->where('namespace', 'visiosoft.module.' . $slug)
|
||||
->where('installed', 1)
|
||||
->where('enabled', 1)
|
||||
->first();
|
||||
if ($isActive == null) {
|
||||
return false;
|
||||
} else
|
||||
return true;
|
||||
return true;
|
||||
}
|
||||
|
||||
public function is_enabled_extension($slug) {
|
||||
$isActive = DB::table('addons_extensions')->where('namespace', 'visiosoft.extension.'. $slug.'_provider')->first();
|
||||
public function is_enabled_extension($slug)
|
||||
{
|
||||
$isActive = DB::table('addons_extensions')->where('namespace', 'visiosoft.extension.' . $slug . '_provider')->first();
|
||||
if ($isActive == null) {
|
||||
return 0;
|
||||
} else
|
||||
return $isActive->enabled;
|
||||
}
|
||||
|
||||
public function is_active() {
|
||||
public function is_active()
|
||||
{
|
||||
$isActive = $this->query()
|
||||
->where('advs_advs.id', $this->id)
|
||||
->where('advs_advs.slug','!=',"")
|
||||
->where('advs_advs.slug', '!=', "")
|
||||
->first();
|
||||
if ($isActive->status != 'approved') {
|
||||
return 0;
|
||||
} else
|
||||
return true;
|
||||
return true;
|
||||
}
|
||||
|
||||
public function getAdv($id = null)
|
||||
{
|
||||
if($id != null)
|
||||
{
|
||||
if ($id != null) {
|
||||
return AdvModel::query()
|
||||
->where('advs_advs.slug','!=',"")
|
||||
->where('advs_advs.slug', '!=', "")
|
||||
->find($id);
|
||||
}
|
||||
return AdvModel::query()
|
||||
->where('advs_advs.slug','!=',"");
|
||||
return AdvModel::query()
|
||||
->where('advs_advs.slug', '!=', "");
|
||||
}
|
||||
|
||||
public function userAdv() {
|
||||
public function userAdv()
|
||||
{
|
||||
|
||||
return $this->getAdv()
|
||||
->where('advs_advs.created_by_id',Auth::id());
|
||||
->where('advs_advs.created_by_id', Auth::id());
|
||||
}
|
||||
|
||||
public function getAdvByCat($cat_id) {
|
||||
public function getAdvByCat($cat_id)
|
||||
{
|
||||
return $this->userAdv()
|
||||
->where('cat1',$cat_id);
|
||||
->where('cat1', $cat_id);
|
||||
}
|
||||
|
||||
public function pendingAdvsByUser() {
|
||||
public function pendingAdvsByUser()
|
||||
{
|
||||
return $this->userAdv()
|
||||
->where('advs_advs.status', '<>', 'approved')
|
||||
->where('advs_advs.status', '<>', 'declined')
|
||||
@ -87,39 +92,43 @@ class AdvModel extends AdvsAdvsEntryModel implements AdvInterface
|
||||
->orWhereNull('advs_advs.finish_at');
|
||||
}
|
||||
|
||||
public function archivedAdvsByUser() {
|
||||
public function archivedAdvsByUser()
|
||||
{
|
||||
return $this->userAdv()
|
||||
->where('advs_advs.finish_at', '<', date('Y-m-d H:i:s'))
|
||||
->WhereNotNull('advs_advs.finish_at');
|
||||
}
|
||||
|
||||
public function favsAdvsByUser($fav_ids) {
|
||||
public function favsAdvsByUser($fav_ids)
|
||||
{
|
||||
return $this->userAdv()
|
||||
->whereIn('advs_advs.id', $fav_ids)//Array favs id
|
||||
->where('advs_advs.status', 'approved');
|
||||
->whereIn('advs_advs.id', $fav_ids)//Array favs id
|
||||
->where('advs_advs.status', 'approved');
|
||||
}
|
||||
|
||||
public function myAdvsByUser() {
|
||||
public function myAdvsByUser()
|
||||
{
|
||||
return $this->userAdv()
|
||||
->where('advs_advs.status', 'approved')
|
||||
->where('advs_advs.finish_at', '>', date('Y-m-d H:i:s'));
|
||||
}
|
||||
|
||||
public function foreignCurrency($currency, $price, $curencies, $isUpdate, $settings) {
|
||||
public function foreignCurrency($currency, $price, $curencies, $isUpdate, $settings)
|
||||
{
|
||||
$currencies = explode(',', $curencies);
|
||||
$foreign_currency = array();
|
||||
|
||||
$client = new Client();
|
||||
|
||||
foreach($currencies as $currencyIn) {
|
||||
foreach ($currencies as $currencyIn) {
|
||||
if ($currencyIn == $currency) {
|
||||
$foreign_currency[$currency] = (int)$price;
|
||||
} else {
|
||||
try {
|
||||
|
||||
$url = $currency."_".$currencyIn;
|
||||
$url = $currency . "_" . $currencyIn;
|
||||
$freecurrencykey = $settings->value('visiosoft.module.advs::free_currencyconverterapi_key');
|
||||
$response = $client->get('http://free.currencyconverterapi.com/api/v6/convert?q='.$url.'&compact=y&apiKey='.$freecurrencykey);
|
||||
$response = $client->get('http://free.currencyconverterapi.com/api/v6/convert?q=' . $url . '&compact=y&apiKey=' . $freecurrencykey);
|
||||
|
||||
} catch (RequestException $e) {
|
||||
|
||||
@ -143,22 +152,22 @@ class AdvModel extends AdvsAdvsEntryModel implements AdvInterface
|
||||
|
||||
public function popularAdvs()
|
||||
{
|
||||
return $this->getAdv()->where('popular_adv',1)->paginate(9);
|
||||
}
|
||||
|
||||
public function advsofDay()
|
||||
{
|
||||
return $this->getAdv()->where('adv_day',1)->paginate(9);
|
||||
return $this->getAdv()->where('popular_adv', 1)->paginate(9);
|
||||
}
|
||||
|
||||
public function statusAds($id,$status)
|
||||
public function advsofDay()
|
||||
{
|
||||
return $this->getAdv()->where('adv_day', 1)->paginate(9);
|
||||
}
|
||||
|
||||
public function statusAds($id, $status)
|
||||
{
|
||||
$this->getAdv($id)->update(['status' => $status]);
|
||||
return $status;
|
||||
|
||||
}
|
||||
|
||||
public function finish_at_Ads($id,$endDate)
|
||||
public function finish_at_Ads($id, $endDate)
|
||||
{
|
||||
$date = date('Y-m-d H:i:s');
|
||||
$this->getAdv($id)->update(['finish_at' => date('Y-m-d H:i:s',
|
||||
@ -178,12 +187,13 @@ class AdvModel extends AdvsAdvsEntryModel implements AdvInterface
|
||||
->first();
|
||||
}
|
||||
|
||||
public function getLocationNames($advs) {
|
||||
public function getLocationNames($advs)
|
||||
{
|
||||
foreach ($advs as $adv) {
|
||||
$country = CountryModel::query()->where('location_countries.id', $adv->country_id)->first();
|
||||
$city = CityModel::query()->where('location_cities.id', $adv->city)->first();
|
||||
|
||||
$adv->setAttribute('country_name' , $country->name);
|
||||
$adv->setAttribute('country_name', $country->name);
|
||||
$adv->setAttribute('city_name', $city->name);
|
||||
}
|
||||
|
||||
@ -193,13 +203,12 @@ class AdvModel extends AdvsAdvsEntryModel implements AdvInterface
|
||||
|
||||
public function isAdv($id)
|
||||
{
|
||||
return $this->getAdv()->where('advs_advs.id',$id)->first();
|
||||
return $this->getAdv()->where('advs_advs.id', $id)->first();
|
||||
}
|
||||
|
||||
public function addCart($item, $quantity = 1)
|
||||
{
|
||||
if(Auth::user())
|
||||
{
|
||||
if (Auth::user()) {
|
||||
$cart = $this->dispatch(new GetCart());
|
||||
$cart->add($item, $quantity);
|
||||
return $this->dispatch(new GetCart());
|
||||
@ -210,62 +219,65 @@ class AdvModel extends AdvsAdvsEntryModel implements AdvInterface
|
||||
}
|
||||
|
||||
|
||||
public function getAdvDetailLinkByModel($object,$type = null) {
|
||||
if($type != null)
|
||||
{
|
||||
public function getAdvDetailLinkByModel($object, $type = null)
|
||||
{
|
||||
if ($type != null) {
|
||||
$id = $object->id;
|
||||
$seo = str_slug($object->name);
|
||||
$seo = str_replace('_','-',$seo);
|
||||
return \route('adv_detail_seo', [$id,$seo]);
|
||||
$seo = str_replace('_', '-', $seo);
|
||||
return \route('adv_detail_seo', [$id, $seo]);
|
||||
}
|
||||
$id = $object->getObject()->id;
|
||||
$seo = str_slug($object->getObject()->name);
|
||||
$seo = str_replace('_','-',$seo);
|
||||
return \route('adv_detail_seo', [$id,$seo]);
|
||||
$seo = str_replace('_', '-', $seo);
|
||||
return \route('adv_detail_seo', [$id, $seo]);
|
||||
}
|
||||
|
||||
public function getAdvDetailLinkByAdId($id) {
|
||||
public function getAdvDetailLinkByAdId($id)
|
||||
{
|
||||
$adv = $this->find($id);
|
||||
if($adv != null)
|
||||
{
|
||||
if ($adv != null) {
|
||||
$id = $adv->id;
|
||||
$seo = str_slug($adv->name);
|
||||
$seo = str_replace('_','-',$seo);
|
||||
return \route('adv_detail_seo', [$id,$seo]);
|
||||
$seo = str_replace('_', '-', $seo);
|
||||
return \route('adv_detail_seo', [$id, $seo]);
|
||||
}
|
||||
}
|
||||
|
||||
public function getAdvimage($id) {
|
||||
public function getAdvimage($id)
|
||||
{
|
||||
return $this->getAdv($id)->files;
|
||||
}
|
||||
|
||||
public function getLatestField($slug) {
|
||||
public function getLatestField($slug)
|
||||
{
|
||||
return DB::table('streams_fields')->where('slug', $slug)->first();
|
||||
}
|
||||
|
||||
public function updateStock($id,$quantity) {
|
||||
public function updateStock($id, $quantity)
|
||||
{
|
||||
$adv = $this->getAdv($id);
|
||||
$oldStock = $adv->stock;
|
||||
$newStock = $oldStock - $quantity;
|
||||
$adv->update(['stock' => $newStock]);
|
||||
}
|
||||
|
||||
public function stockControl($id,$quantity) {
|
||||
public function stockControl($id, $quantity)
|
||||
{
|
||||
$adv = $this->getAdv($id);
|
||||
$stock = $adv->stock;
|
||||
if($stock == NULL or $stock == 0 or $stock == "0")
|
||||
{
|
||||
if ($stock == NULL or $stock == 0 or $stock == "0") {
|
||||
return "false";//Ürün yok ise ve 0 ise
|
||||
}elseif ($stock < $quantity)
|
||||
{
|
||||
} elseif ($stock < $quantity) {
|
||||
return "false";//Adet yetmiyorsa
|
||||
}else {
|
||||
} else {
|
||||
return "true";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public function saveCustomField($category_id, $field_id, $name) {
|
||||
public function saveCustomField($category_id, $field_id, $name)
|
||||
{
|
||||
$all = array();
|
||||
$all['category_id'] = $category_id;
|
||||
$all['field_id'] = $field_id;
|
||||
@ -297,8 +309,7 @@ class AdvModel extends AdvsAdvsEntryModel implements AdvInterface
|
||||
|
||||
public function AddAdsDefaultCoverImage($ad)
|
||||
{
|
||||
if($ad->cover_photo == null)
|
||||
{
|
||||
if ($ad->cover_photo == null) {
|
||||
$ad->cover_photo = $this->dispatch(new MakeImageInstance('theme::images/no-image-ads.jpg', 'img'))->url();
|
||||
} else {
|
||||
$ad->cover_photo = url($ad->cover_photo);
|
||||
@ -309,12 +320,17 @@ class AdvModel extends AdvsAdvsEntryModel implements AdvInterface
|
||||
public function GetAdsDefaultCoverImageByAdId($id)
|
||||
{
|
||||
$adv = $this->find($id);
|
||||
if($adv == null or $adv->cover_photo == null)
|
||||
{
|
||||
if ($adv == null or $adv->cover_photo == null) {
|
||||
$cover_photo = $this->dispatch(new MakeImageInstance('theme::images/no-image-ads.jpg', 'img'))->url();
|
||||
} else {
|
||||
$cover_photo = url($adv->cover_photo);
|
||||
}
|
||||
return $cover_photo;
|
||||
}
|
||||
|
||||
public function viewed_Ad($id)
|
||||
{
|
||||
$ad = $this->find($id);
|
||||
$ad->update(['count_show_ad' => intval($ad->count_show_ad) + 1]);
|
||||
}
|
||||
}
|
||||
|
||||
@ -65,37 +65,40 @@ class AdvsModuleServiceProvider extends AddonServiceProvider
|
||||
// 'admin/advs/custom_fields' => 'Visiosoft\AdvsModule\Http\Controller\Admin\CustomFieldsController@index',
|
||||
// 'admin/advs/custom_fields/create' => 'Visiosoft\AdvsModule\Http\Controller\Admin\CustomFieldsController@create',
|
||||
// 'admin/advs/custom_fields/edit/{id}' => 'Visiosoft\AdvsModule\Http\Controller\Admin\CustomFieldsController@edit',
|
||||
'admin/advs/advs' => 'Visiosoft\AdvsModule\Http\Controller\Admin\AdvsController@index',
|
||||
'admin/advs/advs/create' => 'Visiosoft\AdvsModule\Http\Controller\Admin\AdvsController@create',
|
||||
'admin/advs/advs' => 'Visiosoft\AdvsModule\Http\Controller\Admin\AdvsController@index',
|
||||
'admin/advs/advs/create' => 'Visiosoft\AdvsModule\Http\Controller\Admin\AdvsController@create',
|
||||
'admin/advs/advs/edit/{id}' => 'Visiosoft\AdvsModule\Http\Controller\Admin\AdvsController@edit',
|
||||
'admin/advs/village' => 'Visiosoft\AdvsModule\Http\Controller\Admin\VillageController@index',
|
||||
'admin/advs/village/create' => 'Visiosoft\AdvsModule\Http\Controller\Admin\VillageController@create',
|
||||
'admin/advs/village' => 'Visiosoft\AdvsModule\Http\Controller\Admin\VillageController@index',
|
||||
'admin/advs/village/create' => 'Visiosoft\AdvsModule\Http\Controller\Admin\VillageController@create',
|
||||
'admin/advs/village/edit/{id}' => 'Visiosoft\AdvsModule\Http\Controller\Admin\VillageController@edit',
|
||||
'categories/checkparent/{id}' => 'Visiosoft\AdvsModule\Http\Controller\advsController@checkParentCat',
|
||||
'admin/advs/ajax' => [
|
||||
'as' => 'visiosoft.module.advs::ajax',
|
||||
'admin/advs/ajax' => [
|
||||
'as' => 'visiosoft.module.advs::ajax',
|
||||
'uses' => 'Visiosoft\AdvsModule\Http\Controller\AjaxController@locations',
|
||||
],
|
||||
|
||||
'class/ajax' => [
|
||||
'ajax/viewed/{id}' => [
|
||||
'as' => 'advs::viewed',
|
||||
'uses' => 'Visiosoft\AdvsModule\Http\Controller\AjaxController@viewed',
|
||||
],
|
||||
'class/ajax' => [
|
||||
'uses' => 'Visiosoft\AdvsModule\Http\Controller\AjaxController@locations',
|
||||
],
|
||||
'class/ajaxCategory' => [
|
||||
'class/ajaxCategory' => [
|
||||
'uses' => 'Visiosoft\AdvsModule\Http\Controller\AjaxController@categories',
|
||||
],
|
||||
'admin/advs' => 'Visiosoft\AdvsModule\Http\Controller\Admin\AdvsController@index',
|
||||
'admin/advs/create' => 'Visiosoft\AdvsModule\Http\Controller\Admin\AdvsController@create',
|
||||
'admin/advs' => 'Visiosoft\AdvsModule\Http\Controller\Admin\AdvsController@index',
|
||||
'admin/advs/create' => 'Visiosoft\AdvsModule\Http\Controller\Admin\AdvsController@create',
|
||||
'admin/advs/edit/{id}' => 'Visiosoft\AdvsModule\Http\Controller\Admin\AdvsController@edit',
|
||||
'admin/advs/list' => [
|
||||
'as' => 'visiosoft.module.advs::admin-list',
|
||||
'uses' => 'Visiosoft\AdvsModule\Http\Controller\Admin\AdvsController@manage'
|
||||
],
|
||||
'admin/class/actions/{id}/{type}' => 'Visiosoft\AdvsModule\Http\Controller\Admin\AdvsController@actions',
|
||||
'admin/advs/fields' => 'Visiosoft\AdvsModule\Http\Controller\Admin\FieldsController@index',
|
||||
'admin/advs/fields/choose' => 'Visiosoft\AdvsModule\Http\Controller\Admin\FieldsController@choose',
|
||||
'admin/advs/fields/create' => 'Visiosoft\AdvsModule\Http\Controller\Admin\FieldsController@create',
|
||||
'admin/advs/fields/edit/{id}' => 'Visiosoft\AdvsModule\Http\Controller\Admin\FieldsController@edit',
|
||||
'advs/list' => [
|
||||
'admin/advs/fields' => 'Visiosoft\AdvsModule\Http\Controller\Admin\FieldsController@index',
|
||||
'admin/advs/fields/choose' => 'Visiosoft\AdvsModule\Http\Controller\Admin\FieldsController@choose',
|
||||
'admin/advs/fields/create' => 'Visiosoft\AdvsModule\Http\Controller\Admin\FieldsController@create',
|
||||
'admin/advs/fields/edit/{id}' => 'Visiosoft\AdvsModule\Http\Controller\Admin\FieldsController@edit',
|
||||
'advs/list' => [
|
||||
'as' => 'visiosoft.module.advs::list',
|
||||
'uses' => 'Visiosoft\AdvsModule\Http\Controller\advsController@index'
|
||||
],
|
||||
@ -133,16 +136,16 @@ class AdvsModuleServiceProvider extends AddonServiceProvider
|
||||
'uses' => 'Visiosoft\AdvsModule\Http\Controller\advsController@create',
|
||||
],
|
||||
'class/getcats/{id}' => 'Visiosoft\AdvsModule\Http\Controller\advsController@getCats',
|
||||
'advs/save_adv' => [
|
||||
'advs/save_adv' => [
|
||||
'as' => 'visiosoft.module.advs::post_cat',
|
||||
'uses' => 'Visiosoft\AdvsModule\Http\Controller\advsController@store'
|
||||
],
|
||||
'advs/my_advs' => 'Visiosoft\AdvsModule\Http\Controller\advsController@myAdvs',
|
||||
'advs/my_advs/{params}' => 'Visiosoft\AdvsModule\Http\Controller\advsController@myAdvs',
|
||||
'advs/my_advs/{params}' => 'Visiosoft\AdvsModule\Http\Controller\advsController@myAdvs',
|
||||
'advs/edit_advs/{id}' => 'Visiosoft\AdvsModule\Http\Controller\advsController@edit',
|
||||
'advs/delete_adv/{id}' => 'Visiosoft\AdvsModule\Http\Controller\advsController@destroy',
|
||||
|
||||
'advs/status/{id},{type}' => [
|
||||
'advs/status/{id},{type}' => [
|
||||
'as' => 'visiosoft.module.advs::status',
|
||||
'uses' => 'Visiosoft\AdvsModule\Http\Controller\advsController@statusAds'
|
||||
],
|
||||
@ -314,8 +317,8 @@ class AdvsModuleServiceProvider extends AddonServiceProvider
|
||||
// Use method injection or commands to bring in services.
|
||||
$slug = 'general_settings';
|
||||
$section = [
|
||||
'title' => 'visiosoft.module.advs::button.general_settings',
|
||||
'href' => '/admin/settings/modules/visiosoft.module.advs',
|
||||
'title' => 'visiosoft.module.advs::button.general_settings',
|
||||
'href' => '/admin/settings/modules/visiosoft.module.advs',
|
||||
];
|
||||
$slug2 = 'assets_clear';
|
||||
$section2 = [
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
<?php namespace Visiosoft\AdvsModule\Http\Controller;
|
||||
|
||||
use Anomaly\Streams\Platform\Http\Controller\PublicController;
|
||||
use Visiosoft\AdvsModule\Adv\AdvModel;
|
||||
use Illuminate\Http\Request;
|
||||
use Visiosoft\LocationModule\City\CityModel;
|
||||
use Visiosoft\LocationModule\District\DistrictModel;
|
||||
@ -41,4 +42,9 @@ class AjaxController extends PublicController
|
||||
$datas['category'] = $catModel->searchKeyword($request->q);
|
||||
return response()->json($datas);
|
||||
}
|
||||
|
||||
public function viewed(AdvModel $advModel, $id)
|
||||
{
|
||||
$advModel->viewed_Ad($id);
|
||||
}
|
||||
}
|
||||
@ -156,9 +156,8 @@ class AdvsController extends PublicController
|
||||
AdvModel $advModel
|
||||
)
|
||||
{
|
||||
$isActive = new AdvModel();
|
||||
$isActiveComplaints = $isActive->is_enabled('complaints');
|
||||
$isCommentActive = $isActive->is_enabled('comments');
|
||||
$isActiveComplaints = $advModel->is_enabled('complaints');
|
||||
$isCommentActive = $advModel->is_enabled('comments');
|
||||
|
||||
if ($isActiveComplaints) {
|
||||
$complaints = ComplaintsComplainTypesEntryModel::all();
|
||||
@ -187,14 +186,13 @@ class AdvsController extends PublicController
|
||||
}
|
||||
}
|
||||
|
||||
if ($isActive->is_enabled('customfields')) {
|
||||
if ($advModel->is_enabled('customfields')) {
|
||||
$features = app('Visiosoft\CustomfieldsModule\Http\Controller\cfController')->view($adv);
|
||||
}
|
||||
|
||||
//Cloudinary Module
|
||||
$adv->video_url = null;
|
||||
$isActiveCloudinary = new AdvModel();
|
||||
$isActiveCloudinary = $isActiveCloudinary->is_enabled('cloudinary');
|
||||
$isActiveCloudinary = $advModel->is_enabled('cloudinary');
|
||||
if ($isActiveCloudinary) {
|
||||
|
||||
$CloudinaryModel = new VideoModel();
|
||||
@ -215,7 +213,7 @@ class AdvsController extends PublicController
|
||||
}
|
||||
$events->dispatch(new viewAd($adv));//view ad
|
||||
|
||||
$isActiveqrContact = $isActive->is_enabled('qrcontact');
|
||||
$isActiveqrContact = $advModel->is_enabled('qrcontact');
|
||||
if ($isActiveqrContact) {
|
||||
$qrModel = new QrModel();
|
||||
$qrSRC = $qrModel->source($adv);
|
||||
@ -614,7 +612,7 @@ class AdvsController extends PublicController
|
||||
$custom_fields = app('Visiosoft\CustomfieldsModule\Http\Controller\cfController')->edit($adv, $categories, $cats);
|
||||
}
|
||||
|
||||
return $this->view->make('visiosoft.module.advs::advs/new-create', compact('id', 'cats_d', 'request', 'Cloudinary', 'cities', 'adv', 'custom_fields', 'nameField','descField'));
|
||||
return $this->view->make('visiosoft.module.advs::advs/new-create', compact('id', 'cats_d', 'request', 'Cloudinary', 'cities', 'adv', 'custom_fields', 'nameField', 'descField'));
|
||||
}
|
||||
|
||||
public function destroy($id)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user