public function getNonExistingRelated(array $relationships): array
    {
        $nonExisting = [];

        foreach ($relationships as $relation) {
            if ($this->hasAttribute($relation) && array_key_exists($relation, $this->relationships)) {
                $nonExisting = array_merge($nonExisting, $this->getNonExistingFromRelation($relation));
            }
        }

        return $nonExisting;
    }
public function getNonExistingRelated(array $relationships): array
    {
        $nonExisting = [];

        foreach ($relationships as $relation) {
            if ($this->hasAttribute($relation) && array_key_exists($relation, $this->relationships)) {
                $nonExisting = array_merge($nonExisting, $this->getNonExistingFromRelation($relation));
            }
        }

        return $nonExisting;
    }
public function getNonExistingRelated ( array $ relationships ) : array { $ nonExisting = [ ] ; foreach ( $ relationships as $ relation ) { if ( $ this -> hasAttribute ( $ relation ) && array_key_exists ( $ relation , $ this -> relationships ) ) { $ nonExisting = array_merge ( $ nonExisting , $ this -> getNonExistingFromRelation ( $ relation ) ) ; } } return $ nonExisting ; }
Get Non existing related entities from several relationships.

@param array $relationships

@return array
Get Non existing related entities from several relationships .