Converting to a Polymorphic Relationship #347
Unanswered
qontori
asked this question in
Q&A (Help)
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.
-
Hi there,
"I" migrated one my apps from joomla to laravel with backpack and mimicked much of the same functionality and DB design. Part of this was creating three tables as in attached pic such that the 3rd table xyz has data from both abc and def. This was before I knew what polymorphic relationships were. In Joomla we used code to pull the required data based on the two columns link_key and link_id representing the table and id of that table. I would like to re-engineer this using a polymorphic relationship.
Before I try this I thought it would be prudent to seek some general advise as there is existing data in the tables already. What I am thinking of doing is
An alternative, if possible
I would appreciate any advice on the above two approaches or others that you feel are better.
Thanks advance for your assistance
Beta Was this translation helpful? Give feedback.
All reactions