src/Resource.php
protected function mergeRelationships(array $relationships)
    {
        foreach ($this->merged as $resource) {
            $relationships = array_replace_recursive($relationships, $resource->getRelationshipsAsArray());
        }

        return $relationships;
    }
protected function mergeRelationships(array $relationships)
    {
        foreach ($this->merged as $resource) {
            $relationships = array_replace_recursive($relationships, $resource->getRelationshipsAsArray());
        }

        return $relationships;
    }
protected function mergeRelationships ( array $ relationships ) { foreach ( $ this -> merged as $ resource ) { $ relationships = array_replace_recursive ( $ relationships , $ resource -> getRelationshipsAsArray ( ) ) ; } return $ relationships ; }
Merge the relationships of merged resources into an array of
relationships.

@param array $relationships

@return array
Merge the relationships of merged resources into an array of relationships .