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

carella's avatar

Polymorphic relation

I have to cope with Questions that can have 3 responses type MCQ, Scale, freetext I have created 4 tables: questions (with a response_type field), mcqs, scales, freetexts.

So one Question model has one and only one corresponding model in one of the 3 response type tables Do you think I can modelize this with Polymorphic relations ?

0 likes
0 replies

Please or to participate in this conversation.