@@ -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() |
@@ -81,8 +81,7 @@ |
||
| 81 | 81 | if (User::where('email', $data['email'])->count() === 0) |
| 82 | 82 | { |
| 83 | 83 | $username = $data['email']; |
| 84 | - } |
|
| 85 | - else { |
|
| 84 | + } else { |
|
| 86 | 85 | $username = $this->generateUsername($data['firstname'] . ' ' . $data['lastname']); |
| 87 | 86 | } |
| 88 | 87 | |
@@ -164,8 +164,7 @@ |
||
| 164 | 164 | if (User::where('email', $request->email)->count() === 0) |
| 165 | 165 | { |
| 166 | 166 | $username = $request->email; |
| 167 | - } |
|
| 168 | - else { |
|
| 167 | + } else { |
|
| 169 | 168 | $username = $this->generateUsername($request->firstname . ' ' . $request->lastname); |
| 170 | 169 | } |
| 171 | 170 | |
@@ -30,8 +30,7 @@ |
||
| 30 | 30 | |
| 31 | 31 | if ($firstPeriod) { |
| 32 | 32 | $periods = Period::where('id', '>=', $firstPeriod->id)->get(); |
| 33 | - } |
|
| 34 | - else { |
|
| 33 | + } else { |
|
| 35 | 34 | $periods = Period::all(); |
| 36 | 35 | } |
| 37 | 36 | |
@@ -46,8 +46,7 @@ discard block |
||
| 46 | 46 | 'preciototal' => $product->final_price, |
| 47 | 47 | 'valoriva' => 0, |
| 48 | 48 | ]; |
| 49 | - } |
|
| 50 | - elseif ($product->product instanceof Fee) |
|
| 49 | + } elseif ($product->product instanceof Fee) |
|
| 51 | 50 | { |
| 52 | 51 | $ivkardex[] = [ |
| 53 | 52 | 'codinventario' => $product->product_code, |
@@ -58,8 +57,7 @@ discard block |
||
| 58 | 57 | 'preciototal' => $product->final_price, |
| 59 | 58 | 'valoriva' => 0, |
| 60 | 59 | ]; |
| 61 | - } |
|
| 62 | - elseif ($product->product instanceof Book) |
|
| 60 | + } elseif ($product->product instanceof Book) |
|
| 63 | 61 | { |
| 64 | 62 | $ivkardex[] = [ |
| 65 | 63 | 'codinventario' => $product->product_code, |
@@ -164,8 +164,7 @@ |
||
| 164 | 164 | if (User::where('email', $request->email)->count() === 0) |
| 165 | 165 | { |
| 166 | 166 | $username = $request->email; |
| 167 | - } |
|
| 168 | - else { |
|
| 167 | + } else { |
|
| 169 | 168 | $username = $this->generateUsername($request->firstname . ' ' . $request->lastname); |
| 170 | 169 | } |
| 171 | 170 | |