mirror of
https://github.com/HDInnovations/UNIT3D-Community-Edition.git
synced 2026-04-27 05:50:51 -05:00
Apply fixes from StyleCI
This commit is contained in:
@@ -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(),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user