29 lines
862 B
PHP
29 lines
862 B
PHP
<?php
|
|
|
|
namespace App\Endpoint\Api\Http\Resources\Dealer;
|
|
|
|
use Illuminate\Http\Resources\Json\JsonResource;
|
|
|
|
class UserInfoResource 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,
|
|
'gender' => (string) $this->gender,
|
|
'birthday' => (string) $this->birthday?->toDateString(),
|
|
'code' => (string) $this->code,
|
|
'sale_values'=> '0.00', //todo-当前团队业绩
|
|
'guanli_values'=> '0.00', //todo-预计管理津贴
|
|
'lvl_name'=> '签约经销商',
|
|
];
|
|
}
|
|
}
|