Merge pull request #899 from openclassify/vedat

GET feature enhancements
This commit is contained in:
Fatih Alp 2021-01-07 14:29:19 +03:00 committed by GitHub
commit 4f7e3bdcf0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 19 additions and 1 deletions

View File

@ -31,6 +31,7 @@ return [
'estimated_pending_time',
'default_published_time',
'default_GET',
'get_categories',
'listing_page_image',
'show_ads_count',
],

View File

@ -373,4 +373,12 @@ return [
'bind' => 'advs.lang_switcher_for_browser',
'env' => 'LANG_SWITCHER_FOR_BROWSER',
],
'get_categories' => [
'type' => 'anomaly.field_type.checkboxes',
'config' => [
'options' => function (\Visiosoft\CatsModule\Category\Contract\CategoryRepositoryInterface $categoryRepository) {
return $categoryRepository->mainCats()->pluck('name', 'id')->all();
},
],
],
];

View File

@ -223,4 +223,8 @@ return [
'name' => 'Lang Switcher For Browser',
'instructions' => 'Allows you to choose browser language as active language'
],
'get_categories' => [
'name' => 'GET Categories',
'instructions' => 'It represents the categories in which the GET property will be valid.'
],
];

View File

@ -223,4 +223,8 @@ return [
'name' => 'Tarayıcı Diline Geç',
'instructions' => 'Seçili aktif bir dil olmadığında tarayıcı dilini aktif dil olarak seçmenize izin verir'
],
'get_categories' => [
'name' => 'GET Kategorileri',
'instructions' => 'GET özelliğinin geçerli olacağı kategorileri temsil eder.'
],
];

View File

@ -781,7 +781,8 @@ class AdvsController extends PublicController
}
}
$adv->is_get_adv = $request->is_get_adv;
$get_categories = in_array($adv->cat1, setting_value('visiosoft.module.advs::get_categories'));
$adv->is_get_adv = ($request->is_get_adv and $get_categories) ? true : false;
$adv->save();
//algolia Search Module