public function orWhere($conditions)
    {
        if (is_string($conditions)) {
            $conditions = (array) $conditions;
        }

        if (is_array($conditions)) {
            $args = func_get_args();
            array_shift($args);

            $conditions = array_merge($conditions, $args);

            $this->where(new QueryElement('()', $conditions, ' OR '));
        } elseif (is_callable($conditions)) {
            $query = new static($this->connection);

            $query->where = new QueryElement('()', [], ' OR ');

            call_user_func($conditions, $query);

            $this->where((string) $query->where);
        }

        return $this;
    }
public function orWhere($conditions)
    {
        if (is_string($conditions)) {
            $conditions = (array) $conditions;
        }

        if (is_array($conditions)) {
            $args = func_get_args();
            array_shift($args);

            $conditions = array_merge($conditions, $args);

            $this->where(new QueryElement('()', $conditions, ' OR '));
        } elseif (is_callable($conditions)) {
            $query = new static($this->connection);

            $query->where = new QueryElement('()', [], ' OR ');

            call_user_func($conditions, $query);

            $this->where((string) $query->where);
        }

        return $this;
    }
public function orWhere ( $ conditions ) { if ( is_string ( $ conditions ) ) { $ conditions = ( array ) $ conditions ; } if ( is_array ( $ conditions ) ) { $ args = func_get_args ( ) ; array_shift ( $ args ) ; $ conditions = array_merge ( $ conditions , $ args ) ; $ this -> where ( new QueryElement ( '()' , $ conditions , ' OR ' ) ) ; } elseif ( is_callable ( $ conditions ) ) { $ query = new static ( $ this -> connection ) ; $ query -> where = new QueryElement ( '()' , [ ] , ' OR ' ) ; call_user_func ( $ conditions , $ query ) ; $ this -> where ( ( string ) $ query -> where ) ; } return $ this ; }
Add a single condition, or an array of conditions to the WHERE clause and wrap with OR elements.

Usage:
$query->orWhere(array('a < 5', 'b > 6'));
$query->orWhere('a < 5', 'b > 6');
$query->orWhere(function ($query)
{
$query->where('a < 5')->where('b > 6');
});

Result:
WHERE ... AND (a < 5 OR b > 6)

@param   mixed|callable $conditions A string, array of where conditions or callback to support logic.

@return static  Returns this object to allow chaining.

@since   3.0
Add a single condition or an array of conditions to the WHERE clause and wrap with OR elements .