enter code here
我试图从laravel rightnow中的另一个队列调度队列。例如,我创建了一个这样的工作:
class CandidateQueue extends Job implements SelfHandling
{
protected $request;
public function __construct($request)
{
$this->request = $request;
}
public function handle()
{
....
$this->dispatch($queueEmail);
}
}
问题在于执行$ this-> dispatch()时,laravel说"Call to undefined method ....::dispatch()"
。那么如何从当前队列中触发此队列?
提前致谢
答案 0 :(得分:0)
老问题,但我是怎么做的而不是
#include <iostream>
#include <fstream>
using namespace std;
int main() {
ofstream myfile;
myfile.open("cpp.txt");
while (true) {
myfile << "Writing this to a file Writing this to a file \n";
}
myfile.close();
}
我做了
$this->dipatch(new queueEmail);