Skip to content

How to implement nested data based on polymorphic relationships? #146

Answered by rubenvanassche
ahoiroman asked this question in Q&A
Discussion options

You must be logged in to vote

I don't see any problems in this case, though I would create a dedicated OwnerData object which can be created both from Comme t and Post. Then you could do something like OwnerData::from($video->targetable) which looks nice 😄

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by ahoiroman
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants