Laravel queue event not serializing models

天大地大妈咪最大 提交于 2019-12-06 15:49:01

I believe the issue here is your public $queue property.

The documentation states that you can specify an event queue by defining the $broadcastQueue property. However, it doesn't mention that it also checks for the $queue property if $broadcastQueue is not defined.

Since you have defined a $queue property, it will attempt to push your event onto the queue named by the __toString() value of your QueueJob model instance, which I'm assuming doesn't exist and why your job is never sent to a queue.

If you rename your property to something like $queueJob, then I believe it should work for you.

for running queues you have to run php artisan queue:work

for this also make sure that driver is database you can set it your .env file.

Hope this helps

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!