@@ -9,10 +9,10 @@ |
||
9 | 9 | public function toArray($request) |
10 | 10 | { |
11 | 11 | return [ |
12 | - 'id' => $this->id, |
|
13 | - 'name' => $this->name, |
|
14 | - 'display_name' => $this->display_name, |
|
15 | - 'updated_at' => $this->updated_at->format('Y-m-d H:i:s'), |
|
12 | + 'id' => $this->id, |
|
13 | + 'name' => $this->name, |
|
14 | + 'display_name' => $this->display_name, |
|
15 | + 'updated_at' => $this->updated_at->format('Y-m-d H:i:s'), |
|
16 | 16 | ]; |
17 | 17 | } |
18 | 18 | } |
19 | 19 | \ No newline at end of file |
@@ -9,7 +9,7 @@ |
||
9 | 9 | public function toArray($request) |
10 | 10 | { |
11 | 11 | return [ |
12 | - 'data' => $this->collection, |
|
12 | + 'data' => $this->collection, |
|
13 | 13 | ]; |
14 | 14 | } |
15 | 15 | } |
16 | 16 | \ No newline at end of file |
@@ -27,10 +27,10 @@ |
||
27 | 27 | public function getTycoons($world_id, $initial = null) |
28 | 28 | { |
29 | 29 | if (!empty($initial)) { |
30 | - return Tycoon::where('name', 'like', $initial . '%') |
|
31 | - ->leftjoin('worlds_tycoons', 'tycoons.id', '=', 'worlds_tycoons.id') |
|
32 | - ->where('worlds_tycoons.world_id', $world_id) |
|
33 | - ->get(); |
|
30 | + return Tycoon::where('name', 'like', $initial . '%') |
|
31 | + ->leftjoin('worlds_tycoons', 'tycoons.id', '=', 'worlds_tycoons.id') |
|
32 | + ->where('worlds_tycoons.world_id', $world_id) |
|
33 | + ->get(); |
|
34 | 34 | |
35 | 35 | } else { |
36 | 36 | return World::where('id', $world_id)->with('tycoons.tycoon')->get(); |