Home » Php » Relationship between 3 Models in Laravel 5.6

Relationship between 3 Models in Laravel 5.6

Posted by: admin September 16, 2018 Leave a comment

Questions:

I have 3 models :

Dog
id - name - puce - birhtday
Category
id - name
Event
id - date - name - dog_id - category_id

I would like to get on the individual page of each dog a separate table for each category with the list of all the events of this category.

Answers: