/** * 增加一个 and where 的字句查询(基于查询器) * * @param $this $query * @param string $boolean * @param bool $not * @return $this */ public function addWhereExistsQuery(Builder $query, $boolean = 'and', $not = false) { $type = $not ? 'NotExists' : 'Exists'; $this->wheres[] = compact('type', 'operator', 'query', 'boolean'); $this->addBinding($query->getBindings(), 'where'); return $this; }