protected function updateBelongsToRelation($eloquentModel, $name, $action)
    {
        if ($action == 'insert' || $action == 'update') {
            $eloquentModel->{$name}()->associate($eloquentModel->getRelation($name));
        }
    }
protected function updateBelongsToRelation($eloquentModel, $name, $action)
    {
        if ($action == 'insert' || $action == 'update') {
            $eloquentModel->{$name}()->associate($eloquentModel->getRelation($name));
        }
    }
protected function updateBelongsToRelation ( $ eloquentModel , $ name , $ action ) { if ( $ action == 'insert' || $ action == 'update' ) { $ eloquentModel -> { $ name } ( ) -> associate ( $ eloquentModel -> getRelation ( $ name ) ) ; } }
Update a belongsTo or morphTo relation.

@param \ProAI\Datamapper\Eloquent\Model $eloquentModel
@param string $name
@param string $action
@return void
Update a belongsTo or morphTo relation .