protected function overwriteExistingRelation($name)
    {
        if ($this->relations->isEmpty()) {
            return;
        }

        $this->relations = $this->relations->filter(
            function (Relation $relation) use ($name) {
                return $relation->getName() != $name;
            }
        );
    }
protected function overwriteExistingRelation($name)
    {
        if ($this->relations->isEmpty()) {
            return;
        }

        $this->relations = $this->relations->filter(
            function (Relation $relation) use ($name) {
                return $relation->getName() != $name;
            }
        );
    }
protected function overwriteExistingRelation ( $ name ) { if ( $ this -> relations -> isEmpty ( ) ) { return ; } $ this -> relations = $ this -> relations -> filter ( function ( Relation $ relation ) use ( $ name ) { return $ relation -> getName ( ) != $ name ; } ) ; }
Overwrite existing relation.

@param string $name
Overwrite existing relation .