public function bootstrapRelations()
    {
        $this->relations = $this->getRelations();

        foreach ($this->relations as $relation) {
            if ($relation instanceof BelongsToMany) {
                $this->setPivotPopulator($relation);
            } elseif ($relation instanceof MorphOneOrMany) {
                $this->addMorphClass($relation);
            }
        }
    }
public function bootstrapRelations()
    {
        $this->relations = $this->getRelations();

        foreach ($this->relations as $relation) {
            if ($relation instanceof BelongsToMany) {
                $this->setPivotPopulator($relation);
            } elseif ($relation instanceof MorphOneOrMany) {
                $this->addMorphClass($relation);
            }
        }
    }
public function bootstrapRelations ( ) { $ this -> relations = $ this -> getRelations ( ) ; foreach ( $ this -> relations as $ relation ) { if ( $ relation instanceof BelongsToMany ) { $ this -> setPivotPopulator ( $ relation ) ; } elseif ( $ relation instanceof MorphOneOrMany ) { $ this -> addMorphClass ( $ relation ) ; } } }
Set the model's relations and do some processing with them.

@return void
Set the model s relations and do some processing with them .