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

philipbaginski's avatar

Has Many with two columns

Hi everyone!

I have a problem: I would like to make relation HasMany to more than one column, in fact I need three columns:

Recource Human has columns dad_id, mom_id and momdad_id. All of them have the same model - Human.

I would like to to show all kids of dad or mom or momdad. So, HasMany must "map" all three columns.

Any idea?

0 likes
0 replies

Please or to participate in this conversation.