delete(); if($this->doHelloJob($data)) $job->delete(); else { if ($job->attempts() > 3) $job->delete(); } } public function doHelloJob($data) { [$order, $formId] = $data; Db::name('cache')->insert(['key'=>'test_'.rand(10,20),'result'=>json_encode($order)]); // event('OrderPaySuccess', [$order, $formId]); return true; } }