uids = $uids; $this->data = $data; } /** * Execute the job. * * @return void */ public function handle() { foreach ($this->uids as $uid) { $app = new QQMiniTemplateChannel(); $app->setAppId(config('qqprogram.app_id')) ->toUser($uid) ->setPage($this->data['page']) ->setTitle($this->data['title']) ->setTemplateId($this->data['template_id']) ->setParameters($this->data['parameters']) ->send(); } } }