remove old function

This commit is contained in:
vedatakd 2020-02-14 16:40:20 +03:00
parent 69d62725dc
commit f97a2f4837

View File

@ -142,7 +142,7 @@ class AdvRepository extends EntryRepository implements AdvRepositoryInterface
}
if ($this->model->is_enabled('customfields')) {
$query = app('Visiosoft\CustomfieldsModule\Http\Controller\cfController')->filterSearch($customParameters, $query);
$query = app('Visiosoft\CustomfieldsModule\Http\Controller\cfController')->filterSearch($customParameters, $param, $query);
}
@ -160,29 +160,6 @@ class AdvRepository extends EntryRepository implements AdvRepositoryInterface
$query = $query->whereRaw($column);
}
foreach ($param as $para => $value) {
if (substr($para, 4, 3) === "cf_") {
$id = substr($para, 7);
$minmax = substr($para, 0, 3);
if ($minmax == 'min') {
$num = $param[$minmax . '_cf_' . $id];
$int = (int)$num;
$column = "JSON_EXTRACT(cf_json, '$.cf" . $id . "') >= '" . $int . "'";
$query = $query->whereRaw($column);
}
if ($minmax == 'max') {
$num = $param[$minmax . '_cf_' . $id];
$int = (int)$num;
$column = "JSON_EXTRACT(cf_json, '$.cf" . $id . "') <= '" . $int . "'";
$query = $query->whereRaw($column);
}
}
}
// //UPDATE `default_advs_advs` SET `coor` = (PointFromText('POINT(41.085022 28.804754)')) WHERE `default_advs_advs`.`id` = 8
// //SELECT * FROM `default_advs_advs` WHERE ST_DISTANCE(ST_GeomFromText('POINT(41.0709052 28.829627)'), coor) < 20