public function whereRange(string $field, $gt = null, $lt = null, $format = null, $gtConfig = "gte", $ltConfig = "lte")
    {
        if($gt && $lt) {
            $field = [];

            if($gt) {
                $field[$gtConfig] = $gt;
            }

            if($lt) {
                $field[$ltConfig] = $lt;
            }

            if($format) {
                $field["format"] = $format;
            }

            $param = [
                "range" => [
                    $field
                ]
            ];

            $this->elasticQuery[] = $param;
        }

        return $this;
    }
public function whereRange(string $field, $gt = null, $lt = null, $format = null, $gtConfig = "gte", $ltConfig = "lte")
    {
        if($gt && $lt) {
            $field = [];

            if($gt) {
                $field[$gtConfig] = $gt;
            }

            if($lt) {
                $field[$ltConfig] = $lt;
            }

            if($format) {
                $field["format"] = $format;
            }

            $param = [
                "range" => [
                    $field
                ]
            ];

            $this->elasticQuery[] = $param;
        }

        return $this;
    }
public function whereRange ( string $ field , $ gt = null , $ lt = null , $ format = null , $ gtConfig = "gte" , $ ltConfig = "lte" ) { if ( $ gt && $ lt ) { $ field = [ ] ; if ( $ gt ) { $ field [ $ gtConfig ] = $ gt ; } if ( $ lt ) { $ field [ $ ltConfig ] = $ lt ; } if ( $ format ) { $ field [ "format" ] = $ format ; } $ param = [ "range" => [ $ field ] ] ; $ this -> elasticQuery [ ] = $ param ; } return $ this ; }
Applies range search in query

@param  string $field
@param  null   $gt
@param  null   $lt
@param  null   $format
@param  string $gtConfig
@param  string $ltConfig
@return $this
Applies range search in query