template_id = $template_id; $this->agent_id = $agent_id; } /** * Execute the job. * * @return void * @throws Exception */ public function handle() { $agent = Agent::find($this->agent_id); $template = MiniProgramTemplate::where('template_id', $this->template_id)->first(); if (!$agent || !$template) return; try { new UploadMiniProgram($agent, $template); } catch (GuzzleException | \Exception $e) { throw new Exception($e->getMessage()); } } }