push_text(1009,'标题','内容'); dd($rs);*/ (new EasemobJob(1))->handle(); } public function plantask(){ $list = DB::table('mt_message')->where('dispatch_status',0)->orderBy('id','asc')->get()->toArray(); //dd($list); // if(!empty($list)){ foreach($list as $key => $val){ $msg_id = $val->id; dispatch((new EasemobJob($msg_id))->delay(0));//加入队列 } } //更新 $ids = array_column($list,'id'); $update = [ 'dispatch_status' => 1, ]; DB::table('mt_message')->whereIn('id',$ids)->update($update); } }