繁体   English   中英

Laravel QueueOn错误连接器

[英]Laravel QueueOn Error Connector

我正在使用与Laravel Homestead一起使用queueOn ,但是当我运行它时,它会返回错误“无连接器”。

我的代码:

Mail::queueOn('welcome', 'emails.verify_email', ['user' => $user], function ($m) use ($user) {
    $m->subject('Thank You for register ' . env('APP_NAME'))
      ->to($user->email);
});

当我尝试运行php artisan queue:listen welcome它会返回错误:

InvalidArgumentException:没有[]的连接符

但是如果我尝试使用Mail::queue并且只运行php artisan queue:listen ,那就完美了。

如果使用queueOn是否还需要其他步骤?


我知道一种解决方案是在queue.php添加连接。 但是因为我正在使用Laravel Forge,所以我试图不要弄乱我当前的queue.php

Forge如何处理queueOn? 当我使用我的默认代码并且将queueOn放在Laravel Forge时它完美无缺。

我找到了解决方案:

queue:listen --queue=welcome 

它完美地运作。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM