Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

healyhatman's avatar

Polymorphic relationship with swapped foreign / local IDs

I have main table we'll call "alpha" with a rate_type column

I have 3 tables with an alpha_id column

Can I set up a morphOne polymorphic relationship with the IDs around this way, instead of alpha having a rateable_id column? Or will I need to make a migration and swap the IDs out to alpha?

0 likes
0 replies

Please or to participate in this conversation.