mirror of
https://github.com/openclassify/openclassify.git
synced 2026-01-11 18:01:10 -06:00
fix
This commit is contained in:
parent
aad685d795
commit
d7bdfcef5d
@ -12,6 +12,7 @@ use Anomaly\Streams\Platform\Model\Advs\AdvsAdvsEntryModel;
|
||||
use Visiosoft\AdvsModule\OptionConfiguration\OptionConfigurationModel;
|
||||
use Visiosoft\AdvsModule\Support\Command\Currency;
|
||||
use Visiosoft\CatsModule\Category\Contract\CategoryRepositoryInterface;
|
||||
use Visiosoft\CustomfieldsModule\CustomField\Contract\CustomFieldRepositoryInterface;
|
||||
use Visiosoft\LocationModule\City\CityModel;
|
||||
use Visiosoft\LocationModule\Country\CountryModel;
|
||||
use Visiosoft\CartsModule\Cart\Command\GetCart;
|
||||
@ -381,6 +382,20 @@ class AdvModel extends AdvsAdvsEntryModel implements AdvInterface
|
||||
}
|
||||
}
|
||||
|
||||
public function customfields()
|
||||
{
|
||||
if ($cFs = (array) json_decode($this->cf_json)) {
|
||||
$cFs = array_keys($cFs);
|
||||
|
||||
return app(CustomFieldRepositoryInterface::class)
|
||||
->newQuery()
|
||||
->whereIn('id', $cFs)
|
||||
->get();
|
||||
}
|
||||
|
||||
return [];
|
||||
}
|
||||
|
||||
// public function getCustomFieldEditId($id) {
|
||||
// $custom_field = AdvsCustomFieldsEntryModel::query()->where('advs_custom_fields.id', $id)->first();
|
||||
// return DB::table('streams_assignments')->where('field_id', $custom_field->field_id)->first();
|
||||
|
||||
@ -58,6 +58,8 @@ interface AdvInterface extends EntryInterface
|
||||
|
||||
public function saveCustomField($category_id, $field_id, $name);
|
||||
|
||||
public function customfields();
|
||||
|
||||
public function priceFormat($adv);
|
||||
|
||||
public function AddAdsDefaultCoverImage($ad);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user