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