protected function addMatchAllToEagerLoadQuery(MorphToMany $q, $tags = [])
    {
        $tags = (array) $tags;
        $grammar = $q->getBaseQuery()->getGrammar();
        $subquery = $this->newMatchAllQuery($tags)->select($this->mediaQualifiedRelatedKey());
        $q->whereRaw($grammar->wrap($this->mediaQualifiedRelatedKey()).' IN ('.$subquery->toSql().')', $subquery->getBindings());
        $this->wherePivotTagIn($q, $tags);
    }