@@ -54,7 +54,8 @@ discard block |
||
54 | 54 | |
55 | 55 | public function search() |
56 | 56 | { |
57 | - return QueryBuilder::for(Course::class)->where('campus_id', 1) |
|
57 | + return QueryBuilder::for(Course::class) { |
|
58 | + ->where('campus_id', 1) |
|
58 | 59 | ->with('room')->withCount('events')->withCount('children')->withCount('enrollments') |
59 | 60 | ->allowedFilters([ |
60 | 61 | 'name', |
@@ -63,5 +64,6 @@ discard block |
||
63 | 64 | AllowedFilter::custom('searchable_levels', new FiltersSearchableLevels()), |
64 | 65 | 'teacher_id', ]) |
65 | 66 | ->get(); |
67 | + } |
|
66 | 68 | } |
67 | 69 | } |