Having the following tables. What would be the best or conventional way to add relationships to these tables with eloquent?
I know that a Many to Many relationship will need a pivot table. The thing I'm not seeing samples of online is how to do a relationship from one table to multiple tables. In this case being the profiles table to sizes and breeds tables.
dogs
- id
- name
- profile_id
profiles
- id
- dog_id
- size_id
- breed_id
sizes
- id
- type
breeds
- id
- name
In the end I'd like to be able to query something like this:
Dogs that are sizes in(x-small, small, medium) and breeds in(chihuahua, maltese).
I don't want to confuse myself or others by posting what I'm guessing for my eloquent code as I'm not even close.