/ tag
Data-modeling
1 post on this topic.
-
Polymorphic models in Laravel: one table, two different records (Eloquent morphs)
A CRM tracked two kinds of record that shared almost no fields but flowed through the same statuses, teams, and dashboards. I modeled it as one table with a polymorphic child — and hung the whole framework off the shared root. Mostly it worked; a couple of seams are worth showing.