Apply fixes from StyleCI

This commit is contained in:
HDVinnie
2018-12-06 14:42:13 +00:00
committed by StyleCI Bot
parent f356ed2b76
commit 00bb324053
896 changed files with 21420 additions and 21162 deletions
+9 -7
View File
@@ -1,11 +1,12 @@
<?php
/**
* NOTICE OF LICENSE
* NOTICE OF LICENSE.
*
* UNIT3D is open-sourced software licensed under the GNU General Public License v3.0
* The details is bundled with this project in the file LICENSE.txt.
*
* @project UNIT3D
*
* @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
* @author Poppabear
*/
@@ -19,18 +20,19 @@ class ChatRoomResource extends JsonResource
/**
* Transform the resource into an array.
*
* @param \Illuminate\Http\Request $request
* @param \Illuminate\Http\Request $request
*
* @return array
*/
public function toArray($request)
{
return [
'id' => $this->id,
'name' => $this->name,
'users' => UserResource::collection($this->whenLoaded('users')),
'messages' => ChatMessageResource::collection($this->whenLoaded('messages')),
'id' => $this->id,
'name' => $this->name,
'users' => UserResource::collection($this->whenLoaded('users')),
'messages' => ChatMessageResource::collection($this->whenLoaded('messages')),
'created_at' => $this->created_at->diffForHumans(),
'updated_at' => $this->updated_at->diffForHumans()
'updated_at' => $this->updated_at->diffForHumans(),
];
}
}