$this->uuid(), 'method' => '', // 'sender' => '', //发送者ID 'receive' => '', //接收者ID 'receiveType' => '', //接收者类型 1:好友;2:群组 'message' => $data ]; $this->payload = $message; } /** * 生成唯一ID * * @return string */ private function uuid() { return Str::random() . rand(100000, 999999) . uniqid(); } }