protected function getEntityAttributeRelation(string $key)
    {
        $key = $this->getEntityAttributeName($key);

        if ($this->relationLoaded($key)) {
            return $this->getRelation($key);
        }

        return $this->getRelationValue($key);
    }
protected function getEntityAttributeRelation(string $key)
    {
        $key = $this->getEntityAttributeName($key);

        if ($this->relationLoaded($key)) {
            return $this->getRelation($key);
        }

        return $this->getRelationValue($key);
    }
protected function getEntityAttributeRelation ( string $ key ) { $ key = $ this -> getEntityAttributeName ( $ key ) ; if ( $ this -> relationLoaded ( $ key ) ) { return $ this -> getRelation ( $ key ) ; } return $ this -> getRelationValue ( $ key ) ; }
Get the entity attribute relationship.

@param string $key

@return mixed
Get the entity attribute relationship .