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

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