-
Notifications
You must be signed in to change notification settings - Fork 1.4k
[Feature] Add MorphToMany support #2670
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
attach MorphToMany working detaching works sync working cleanup
# Conflicts: # tests/RelationsTest.php
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the parent method is fine and we don't need to override this. I will write test for this too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This one is related to HybridRelations and never called in my tests.
We don't need this method anymore;
This reverts commit 5d229eb.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added a match expression to handle the MorphToMany relations has query.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a minor comment. Thanks for working on this @hans-thomas, and I really appreciate the amount of comments you added to the code! ❤️
@alcaeus My pleasure❤️
Co-authored-by: Andreas Braun <alcaeus@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. A last question about the commented code and minor CS fixes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great 👍🏻 It seems that you have tested this case carefully.
Co-authored-by: Jérôme Tamarelle <jerome@tamarelle.net>
Co-authored-by: Jérôme Tamarelle <jerome@tamarelle.net>
Thank you so much @hans-thomas
@GromNaN I'm glad I could help❤️
Uh oh!
There was an error while loading. Please reload this page.
Hi,
I continued #2640 PR, thanks to @ithuis. I fixed the relationship and its inverse way,
but it still needs more tests for
attachinga collection of modelsdetachingactionsyncingactionloadmethodIt has to be done by tomorrow.