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();
}