Illuminate\Database\Query\Builder::whereInExistingQuery PHP Method

whereInExistingQuery() protected method

Add an external sub-select to the query.
protected whereInExistingQuery ( string $column, Builder | static $query, string $boolean, boolean $not )
$column string
$query Builder | static
$boolean string
$not boolean
    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;
    }