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

lara66806's avatar

How to handle a 3 way join on a join table, not the entities themselves

Hi All,

I've tried multiple times to achieve this now using strictly Eloquent only, no Query Builder.

I have 3 tables, the default User table, Whisky table & Review table. I'm trying to set up a table called user_whisky_review that has an id, user_id, whisky_id, review_id. How should I go about doing this?

The idea is that when I save a review it saves the user and the whisky to be reviewed onto this join table and not on the entitys themselves as there can be many reviews to one user and many reviews to one whisky and many whiskies to one user.

I hope this makes sense! If not please feel free to ask for clarification.

Kind Regards, Adam

0 likes
1 reply
s4muel's avatar

i would store that user and whisky information in the Review table

review

  • id
  • user_id
  • whisky_id
  • ...

Please or to participate in this conversation.