-
Notifications
You must be signed in to change notification settings - Fork 1.5k
[Updated PR#1796] Add Attributes to the Pivot Embed #1952
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
Co-Authored-By: Adam Allport <[email protected]>
$id = $model->getKey(); | ||
} else { | ||
if ($id instanceof Collection) { | ||
$id = $id->modelKeys(); |
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.
Maybe better to rename $id
to $idModelKeys
and after line to cast into array
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.
Well, there is an parseIds
function which is doing that, not sure why we're doing double work.
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 that author of parent PR don't see this function
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.
Maybe use this function and remove this code?
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.
Well, I don't like this implementation at all, it has a tests but implementation isn't following framework conventions, I think it needs complete rewrite from scratch, maybe close this at all?
This is not the best integration that was made. It needs complete rewrite so closing for now. |
This PR was recreated from #1796 with updated branch and resolved conflicting files.
--
Adds Attributes to the Pivot Embed,
Currently got the attribute saving, and retrieval.
Just having a few issues when it comes to eager loading
Help would be appreciated
Supersedes: #1794
Fixes: #1618
Co-Authored-By: Adam Allport [email protected]