protected function addForeignRelation(string $relation)
    {
        if (!in_array($relation, $this->foreignRelations)) {
            $this->foreignRelations[] = $relation;
        }
    }
protected function addForeignRelation(string $relation)
    {
        if (!in_array($relation, $this->foreignRelations)) {
            $this->foreignRelations[] = $relation;
        }
    }
protected function addForeignRelation ( string $ relation ) { if ( ! in_array ( $ relation , $ this -> foreignRelations ) ) { $ this -> foreignRelations [ ] = $ relation ; } }
Add a foreign relation method name once.

@param string $relation
Add a foreign relation method name once .