protected function whereInExistingQuery($column, $query, $boolean, $not) { $type = $not ? 'NotInSub' : 'InSub'; $this->wheres[] = compact('type', 'column', 'query', 'boolean'); $this->addBinding($query->getBindings(), 'where'); return $this; }