WIP
parent
5b18fc8002
commit
76c99c66c7
|
|
@ -0,0 +1,23 @@
|
|||
<?php
|
||||
|
||||
namespace App\Endpoint\Api\Http\Resources;
|
||||
|
||||
use Illuminate\Http\Resources\Json\JsonResource;
|
||||
|
||||
class UserInfoSimpleResource extends JsonResource
|
||||
{
|
||||
/**
|
||||
* Transform the resource into an array.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @return array|\Illuminate\Contracts\Support\Arrayable|\JsonSerializable
|
||||
*/
|
||||
public function toArray($request)
|
||||
{
|
||||
return [
|
||||
'nickname' => (string) $this->nickname,
|
||||
'avatar' => (string) $this->avatar,
|
||||
'code' => (string) $this->code,
|
||||
];
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue