@@ -55,9 +55,9 @@ |
||
55 | 55 | */ |
56 | 56 | public function orderedSiteLocationsBy($site_id, $location_id) |
57 | 57 | { |
58 | - $locations = self::query()->select(['id', 'name']) |
|
58 | + $locations = self::query()->select([ 'id', 'name' ]) |
|
59 | 59 | ->where('site_id', '=', $site_id) |
60 | - ->orderByRaw(DB::raw("(id = " . $location_id . ") DESC")) |
|
60 | + ->orderByRaw(DB::raw("(id = ".$location_id.") DESC")) |
|
61 | 61 | ->get(); |
62 | 62 | return $locations; |
63 | 63 | } |
@@ -42,8 +42,8 @@ |
||
42 | 42 | */ |
43 | 43 | public function orderedSitesBy($id) |
44 | 44 | { |
45 | - $sites = self::query()->select(['id', 'name']) |
|
46 | - ->orderByRaw(DB::raw("(id = " . $id . ") DESC")) |
|
45 | + $sites = self::query()->select([ 'id', 'name' ]) |
|
46 | + ->orderByRaw(DB::raw("(id = ".$id.") DESC")) |
|
47 | 47 | ->get(); |
48 | 48 | return $sites; |
49 | 49 | } |