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

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