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

removeSecondWhereClause() protected method

Remove the second where clause from the relationship query.
protected removeSecondWhereClause ( ) : void
return void
    protected function removeSecondWhereClause()
    {
        $wheres =& $this->getBaseQuery()->wheres;
        // We'll grab the second where clause off of the set of wheres, and then reset
        // the where clause keys so there are no gaps in the numeric keys. Then we
        // remove the binding from the query so it doesn't mess things when run.
        $second = $wheres[1];
        unset($wheres[1]);
        $wheres = array_values($wheres);
    }