protected function parseSub($query)
    {
        if ($query instanceof self || $query instanceof EloquentBuilder) {
            return [$query->toSql(), $query->getBindings()];
        } elseif (is_string($query)) {
            return [$query, []];
        } else {
            throw new InvalidArgumentException;
        }
    }
protected function parseSub($query)
    {
        if ($query instanceof self || $query instanceof EloquentBuilder) {
            return [$query->toSql(), $query->getBindings()];
        } elseif (is_string($query)) {
            return [$query, []];
        } else {
            throw new InvalidArgumentException;
        }
    }
protected function parseSub ( $ query ) { if ( $ query instanceof self || $ query instanceof EloquentBuilder ) { return [ $ query -> toSql ( ) , $ query -> getBindings ( ) ] ; } elseif ( is_string ( $ query ) ) { return [ $ query , [ ] ] ; } else { throw new InvalidArgumentException ; } }
Parse the subquery into SQL and bindings.

@param  mixed  $query
@return array
Parse the subquery into SQL and bindings .