@@ -38,7 +38,7 @@ |
||
| 38 | 38 | // should return either a User instance or null. You're free to obtain |
| 39 | 39 | // the User instance via an API token or any other method necessary. |
| 40 | 40 | |
| 41 | - $this->app['auth']->viaRequest('api', function ($request) { |
|
| 41 | + $this->app[ 'auth' ]->viaRequest('api', function($request) { |
|
| 42 | 42 | if ($request->input('api_token')) { |
| 43 | 43 | return User::where('api_token', $request->input('api_token'))->first(); |
| 44 | 44 | } |
@@ -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 |
@@ -20,7 +20,7 @@ |
||
| 20 | 20 | ]; |
| 21 | 21 | |
| 22 | 22 | if (!empty($this->worlds)) { |
| 23 | - $galaxies['worlds'] = WorldResource::collection($this->worlds); |
|
| 23 | + $galaxies[ 'worlds' ] = WorldResource::collection($this->worlds); |
|
| 24 | 24 | } |
| 25 | 25 | |
| 26 | 26 | return $galaxies; |
@@ -16,15 +16,15 @@ |
||
| 16 | 16 | ]; |
| 17 | 17 | |
| 18 | 18 | if ($this->investors_count !== null) { |
| 19 | - $data['investors'] = $this->investors_count; |
|
| 19 | + $data[ 'investors' ] = $this->investors_count; |
|
| 20 | 20 | } |
| 21 | 21 | |
| 22 | 22 | if ($this->online_count !== null) { |
| 23 | - $data['online'] = $this->online_count; |
|
| 23 | + $data[ 'online' ] = $this->online_count; |
|
| 24 | 24 | } |
| 25 | 25 | |
| 26 | 26 | if ($this->updated_at !== null) { |
| 27 | - $data['updated_at'] = $this->updated_at->format('Y-m-d H:i:s'); |
|
| 27 | + $data[ 'updated_at' ] = $this->updated_at->format('Y-m-d H:i:s'); |
|
| 28 | 28 | } |
| 29 | 29 | |
| 30 | 30 | return $data; |
@@ -15,14 +15,14 @@ |
||
| 15 | 15 | |
| 16 | 16 | public function getTycoonsByInitial($initial) |
| 17 | 17 | { |
| 18 | - return Tycoon::where('tycoons.name', 'like', $initial . '%')->get(); |
|
| 18 | + return Tycoon::where('tycoons.name', 'like', $initial.'%')->get(); |
|
| 19 | 19 | } |
| 20 | 20 | |
| 21 | 21 | public function getTycoonsByWorldAndInitial($world_id, $initial) |
| 22 | 22 | { |
| 23 | 23 | return Tycoon::leftjoin('worlds_tycoons', 'worlds_tycoons.tycoon_id', '=', 'tycoons.id') |
| 24 | 24 | ->where('worlds_tycoons.world_id', $world_id) |
| 25 | - ->where('tycoons.name', 'like', $initial . '%') |
|
| 25 | + ->where('tycoons.name', 'like', $initial.'%') |
|
| 26 | 26 | ->get(); |
| 27 | 27 | } |
| 28 | 28 | |
@@ -24,14 +24,14 @@ |
||
| 24 | 24 | public function getGalaxies() |
| 25 | 25 | { |
| 26 | 26 | return GalaxyResource::collection( |
| 27 | - Galaxy::with(['type', 'worlds'])->get() |
|
| 27 | + Galaxy::with([ 'type', 'worlds' ])->get() |
|
| 28 | 28 | ); |
| 29 | 29 | } |
| 30 | 30 | |
| 31 | 31 | public function getGalaxyTypes() |
| 32 | 32 | { |
| 33 | 33 | return GalaxyTypeResource::collection( |
| 34 | - Cache::remember('galaxy_types', config('redis.cache_lives.galaxy_types', 60), function () { |
|
| 34 | + Cache::remember('galaxy_types', config('redis.cache_lives.galaxy_types', 60), function() { |
|
| 35 | 35 | return GalaxyType::all(); |
| 36 | 36 | }) |
| 37 | 37 | ); |