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);
            }
        }
    }