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

JohnnyL's avatar

3-way relations

I'm trying to associate 2 users + a type.

users id name

types id name

association_table <- user_id1 user_id2 type_id

All 3 tables have a model but I'm open to pivots and other suggestions.

I managed to do it by creating a block of ->associates but I don't think that's the route I want to take.

Thanks!

p.s Sorry for the weird table layout. Laracast seems to eat my returns...

0 likes
0 replies

Please or to participate in this conversation.