Add a single item to a relation? #17797
Unanswered
nehalist
asked this question in
Q&A / Support
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hey there,
how do I add a single item to a relation? The docs only showcase how to set the relation, but I want to add a single item to existing relations. Interestingly,
$obj->setRelation([...$obj->getRelations(), $newRelation]);
doesn't even work and I have to manually set relations after I've iterated through all new relations (by awkwardly temp saving the relations and such).Any ideas? Thanks!
Beta Was this translation helpful? Give feedback.
All reactions