wintercms / docs

The Winter CMS documentation
https://wintercms.com/docs
Creative Commons Attribution 4.0 International
37 stars 69 forks source link

Queueing closures #16

Closed damsfx closed 3 years ago

damsfx commented 3 years ago

I was just trying queueing closure according to the documentation, but falling in an "Closure object cannot have properties" error. After a quick search, it look like Laravel dind't even support queueing closure since v5.3.0 release note.

LukeTowers commented 3 years ago

@bennothommo do you think we should fix support or update the docs for this case?

bennothommo commented 3 years ago

@damsfx @LukeTowers queuing closures was brought back it seems. It can be done in Laravel 6 - https://laravel.com/docs/6.x/queues#queueing-closures. The issue is that you can't have any properties - you must instead pass through the variables you need through the use statement.

We'd just need to update our docs to show an example without any properties.