setRelation() should work. It sets the value in the relations array.
$owner->setRelation('domain', $domain);
When setting a one to many relationship, you may need to use values():
$owner->setRelation('domains', $domains->values());
setRelation() should work. It sets the value in the relations array.
$owner->setRelation('domain', $domain);
When setting a one to many relationship, you may need to use values():
$owner->setRelation('domains', $domains->values());