Level 73
I would go with two pivots one for model_toy and one for child_toy.
Since there can be toys that no child yet owns.
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I have a many to many relationship to toys, models and children. When I give the child's toy, I want to know first if the child already owns that kind of toy with the same model. So my validation would be
($child->pivot->toy_id == $this->toy && $child->pivot->model_id == $this->model)
But I don't know if its okay to have three foreign keys in a pivot table?
Please or to participate in this conversation.