Hey guys,
I'm starting to get back into Laravel and some concepts are kind of hard to grasp. I have a problem with a specific relationship I hope to get help with solving.
I have 3 tables:
- shops
- review_sites
- review_urls
Inside of shops there are various shop related columns but no direct relationships with the other 2 tables.
Inside of review_sites there is just an id and a name column.
Inside of review_urls there is the id, site_id, shop_id, and url columns.
What I'd like to be able to do is grab the data so it returns the shop, a list of the review sites and within that list the review url for each one. For example:
Shop (array) -> Review Site (array) -> IF there's an entry in review_urls for this site then Review URL
I hope this makes sense. If I can make anything clearer please let me know!
P.S. if you know of a video where Jeffrey goes over this please link it so I can watch.