Пример #1
0
 /**
  * Listing the Course for an Age Group
  * @param  int $id 
  * @return App\Course
  */
 public function listCourses($id)
 {
     $ageGroup = AgeGroup::with(['courses' => function ($query) {
         $query->with('days');
     }])->whereId($id)->get();
     return $ageGroup;
 }