vendredi 26 mai 2017

Laravel — Loop all data from multiple tables

good day. I have researched about it, but nothings matched with my problem. Here's the scenario. I have courses table, and 3 more tables, assignments, quizzes, and reports. Now, what I want is, to get all of the records from the table assignments, quizzes, and reports and loop through all the records below a specific course.
Example Output:
Course1
  Assignment1
  Quiz1
  Report1

How can I do that with three different tables? I know how to use the basic many to many relationship, but for this. I really got stacked. Need help guys.

Note: I'm using Laravel5.1



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2qiE21h
via IFTTT

Aucun commentaire:

Enregistrer un commentaire