public static function getAdvancedSearchFields($postType)
    {
        $postTypeFields = json_decode(DB::table('post_type')->where("slug", $postType)->first()->fields);
        $advancedSearchFields = array();
        foreach ($postTypeFields as $fieldArray){
            if($fieldArray->type->inputType == "image"
                || $fieldArray->type->inputType == "file"
                || $fieldArray->type->inputType == "editor"
                || $fieldArray->type->inputType == "checkbox"
                || $fieldArray->type->inputType == "dropdown"
                || $fieldArray->type->inputType == "radio"
            ) {
                continue;
            }
            $properties = array();
            foreach ($fieldArray as $key => $field){
                if($key == "name") {
                    $properties['name'] = $field;
                }else if($key == "type") {
                    $properties['type'] = $field->inputType;
                }else if($key == "slug") {
                    $properties['db-column'] = $field;
                }
            }
            if(count($properties)) {
                array_push($advancedSearchFields, $properties);
            }
        }
        return $advancedSearchFields;
    }