LMongo\Eloquent\Relations\Relation::getAndResetWheres PHP Method

getAndResetWheres() public method

The remaining constraints on the query will be reset and returned.
public getAndResetWheres ( ) : array
return array
    public function getAndResetWheres()
    {
        // When a model is "soft deleting", the "deleted at" where clause will be the
        // first where clause on the relationship query, so we will actually clear
        // the second where clause as that is the lazy loading relations clause.
        if ($this->query->getModel()->isSoftDeleting()) {
            $this->removeSecondWhereClause();
        } else {
            $this->removeFirstWhereClause();
        }
        return $this->getBaseQuery()->getAndResetWheres();
    }