Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/laravel/11.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/csharp-4.0/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php Laravel排队错误连接器_Php_Laravel - Fatal编程技术网

Php Laravel排队错误连接器

Php Laravel排队错误连接器,php,laravel,Php,Laravel,我正在对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

我正在对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
中添加一个连接。但是因为我使用的是LaravelForge,所以我尽量不去弄乱我当前的
queue.php

Forge如何处理排队问题?当我使用默认代码并在Laravel Forge将
队列设置为
时,它工作得非常好。

我找到了解决方案:

queue:listen --queue=welcome 
它工作得很好