I store relationship in variable:
$relation = $model->{$relationConfig['relation']}();
then i make sure that its indeed HasMany relationship:
dd($relation);
And i see this picture. Then, i am using it like so:
$relation->associate($newModel);
And then this error happens:
Call to undefined method Illuminate\Database\Eloquent\Relations\HasMany::associate()
Whats wrong am i doing here?