$this->phone, 'nickname' => (string) $this->whenLoaded('userInfo', function () { return $this->userInfo->nickname; }, ''), 'avatar' => (string) $this->whenLoaded('userInfo', function () { return $this->userInfo->avatar; }, ''), 'value' => (string) $this->whenLoaded('userInfo', function () { return $this->userInfo->growth_value; }, 0), 'level_name' => (string) $this->whenLoaded('userInfo', function () { return $this->userInfo->agent_level_name; }, '未知'), ]; } }