Intermediate Pivot Model Methods and Columns #47426
Unanswered
myregistration
asked this question in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
It would be helpful if we could access intermediate pivot model methods by chaining withPivot('someIntermediateMethod') instead of only pivot columns.
Also, it would be nice if you included primary keys and all other additional pivot columns instead of us having to use withPivot('id') on the belongsToMany definition. I stored an auto-incremented primary key in another relative intermediate pivot table and couldn't understand why the foreign key was null. I finally ran across some info about adding withPivot('id') to belongsToMany definition so the foreign key in the relative intermediate table wasn't NULL.
Beta Was this translation helpful? Give feedback.
All reactions