code: protected function adapterFor($relation)
      {
          $adapter = $this->getStore()->adapterFor($relation->getModel());
  
          if (!$adapter instanceof AbstractAdapter) {
              throw new RuntimeException('Expecting inverse resource adapter to be an Eloquent adapter.');
          }
  
          return $adapter;
      }
docs: Get an Eloquent adapter for the supplied record's relationship.
  
  @param Relation|Builder $relation
  @return AbstractAdapter