public function mergeConstraintsFrom(Builder $from)
    {
        $whereBindings = array_get(
            $from->getQuery()->getRawBindings(), 'where', []
        );
        // Here we have some other query that we want to merge the where constraints from. We will
        // copy over any where constraints on the query as well as remove any global scopes the
        // query might have removed. Then we will return ourselves with the finished merging.
        return $this->withoutGlobalScopes(
            $from->removedScopes()
        )->mergeWheres(
            $from->getQuery()->wheres, $whereBindings
        );
    }