protected function populateForeignKeys(array $formatters, $seeding)
    {
        foreach ($this->relations as $relation) {
            if ($relation instanceof MorphTo) {
                $this->associateMorphTo($formatters, $relation, $seeding);
            } elseif ($relation instanceof BelongsTo) {
                $this->associateBelongsTo($formatters, $relation, $seeding);
            }
        }

        return $formatters;
    }
protected function populateForeignKeys(array $formatters, $seeding)
    {
        foreach ($this->relations as $relation) {
            if ($relation instanceof MorphTo) {
                $this->associateMorphTo($formatters, $relation, $seeding);
            } elseif ($relation instanceof BelongsTo) {
                $this->associateBelongsTo($formatters, $relation, $seeding);
            }
        }

        return $formatters;
    }
protected function populateForeignKeys ( array $ formatters , $ seeding ) { foreach ( $ this -> relations as $ relation ) { if ( $ relation instanceof MorphTo ) { $ this -> associateMorphTo ( $ formatters , $ relation , $ seeding ) ; } elseif ( $ relation instanceof BelongsTo ) { $ this -> associateBelongsTo ( $ formatters , $ relation , $ seeding ) ; } } return $ formatters ; }
Set the closures that will be used to populate the foreign keys
using the previously added related models.

@param  array    $formatters
@param  bool     $seeding
@return array The formatters.
Set the closures that will be used to populate the foreign keys using the previously added related models .