chris
#1
I am trying to add many models to a belongsToMany
relationship as per the documentation here
$coach->secondary_types()->addMany([$life, $mens]);
and I have an exception Call to undefined method October\Rain\Database\Relations\BelongsToMany::addMany()
daft
#2
This is for hasMany relations where multiple records need to be saved. For belongsToMany I think it is safe to use add()
instead.
chris
#3
indeed, I did multiple add
, it is fine in my case as it is a simple seeder.