protected function convertIncomingQBtoQuery(Builder $query, stdClass $rule, $value, $queryCondition = 'AND')
    {
        /*
         * Convert the Operator (LIKE/NOT LIKE/GREATER THAN) given to us by QueryBuilder
         * into on one that we can use inside the SQL query
         */
        $sqlOperator = $this->operator_sql[$rule->operator];
        $operator = $sqlOperator['operator'];
        $condition = strtolower($queryCondition);

        if ($this->operatorRequiresArray($operator)) {
            return $this->makeQueryWhenArray($query, $rule, $sqlOperator, $value, $condition);
        } elseif ($this->operatorIsNull($operator)) {
            return $this->makeQueryWhenNull($query, $rule, $sqlOperator, $condition);
        }

        return $query->where($rule->field, $sqlOperator['operator'], $value, $condition);
    }
protected function convertIncomingQBtoQuery(Builder $query, stdClass $rule, $value, $queryCondition = 'AND')
    {
        /*
         * Convert the Operator (LIKE/NOT LIKE/GREATER THAN) given to us by QueryBuilder
         * into on one that we can use inside the SQL query
         */
        $sqlOperator = $this->operator_sql[$rule->operator];
        $operator = $sqlOperator['operator'];
        $condition = strtolower($queryCondition);

        if ($this->operatorRequiresArray($operator)) {
            return $this->makeQueryWhenArray($query, $rule, $sqlOperator, $value, $condition);
        } elseif ($this->operatorIsNull($operator)) {
            return $this->makeQueryWhenNull($query, $rule, $sqlOperator, $condition);
        }

        return $query->where($rule->field, $sqlOperator['operator'], $value, $condition);
    }
protected function convertIncomingQBtoQuery ( Builder $ query , stdClass $ rule , $ value , $ queryCondition = 'AND' ) { /*
         * Convert the Operator (LIKE/NOT LIKE/GREATER THAN) given to us by QueryBuilder
         * into on one that we can use inside the SQL query
         */ $ sqlOperator = $ this -> operator_sql [ $ rule -> operator ] ; $ operator = $ sqlOperator [ 'operator' ] ; $ condition = strtolower ( $ queryCondition ) ; if ( $ this -> operatorRequiresArray ( $ operator ) ) { return $ this -> makeQueryWhenArray ( $ query , $ rule , $ sqlOperator , $ value , $ condition ) ; } elseif ( $ this -> operatorIsNull ( $ operator ) ) { return $ this -> makeQueryWhenNull ( $ query , $ rule , $ sqlOperator , $ condition ) ; } return $ query -> where ( $ rule -> field , $ sqlOperator [ 'operator' ] , $ value , $ condition ) ; }
Convert an incomming rule from jQuery QueryBuilder to the Eloquent Querybuilder

(This used to be part of makeQuery, where the name made sense, but I pulled it
out to reduce some duplicated code inside JoinSupportingQueryBuilder)

@param Builder $query
@param stdClass $rule
@param mixed $value the value that needs to be queried in the database.
@param string $queryCondition and/or...
@return Builder
Convert an incomming rule from jQuery QueryBuilder to the Eloquent Querybuilder