publish = $publish; parent::__construct(); } /** * Execute the console command. * * @return int */ public function handle() { if (\App\Tools\Tools::isStop()) { return 0; } $this->publish->publishMessage('ai_translate', ['text' => 'hello']); Mq::publish('hello', ['hello world']); $discussion = $this->option('discussion'); if ($discussion && Str::isUuid($discussion)) { Mq::publish('discussion', new DiscussionResource(Discussion::find($discussion))); } $pr = $this->option('pr'); if ($pr && Str::isUuid($pr)) { Mq::publish('suggestion', new SentPrResource(SentPr::where('uid', $pr)->first())); } return 0; } }