Is it possible with eloquent to query a chain of linked tables with some tables having more than one relationships and get all the information associated?
For example:
- Table Schools has a one to many relationship with Courses
- Table Courses has a many to many relationship with Students
- Table Teachers has a one to many relationship with Courses
- Table Supervisors has a one to many relationship with Students
- Table Books has a many to many relationship with Students
if one wanted all the information for a particular school (i.e. students, courses, teachers, books, supervisors that are linked to the school) would that be possible with eloquent? Or is it only possible with raw SQL?
I'm not looking for the solution of the example, just the approach for querying for multiple tables where each has multiple relationships.