@@ -39,7 +39,8 @@ discard block |
||
39 | 39 | |
40 | 40 | public function search() |
41 | 41 | { |
42 | - return QueryBuilder::for(Course::class)->where('campus_id', 1) |
|
42 | + return QueryBuilder::for(Course::class) { |
|
43 | + ->where('campus_id', 1) |
|
43 | 44 | ->with('room')->withCount('events')->withCount('children')->withCount('enrollments') |
44 | 45 | ->allowedFilters([ |
45 | 46 | 'name', |
@@ -49,6 +50,7 @@ discard block |
||
49 | 50 | AllowedFilter::exact('teacher_id'), |
50 | 51 | ]) |
51 | 52 | ->get(); |
53 | + } |
|
52 | 54 | } |
53 | 55 | |
54 | 56 | public function redirectToUserPreferredView() |
@@ -228,8 +228,7 @@ |
||
228 | 228 | $periodId = $request->get('periodId'); |
229 | 229 | if ($periodId) { |
230 | 230 | $pendingBalance = Enrollment::period($periodId)->pending()->sum('balance'); |
231 | - } |
|
232 | - else { |
|
231 | + } else { |
|
233 | 232 | $pendingBalance = Enrollment::pending()->sum('balance'); |
234 | 233 | } |
235 | 234 |