The Queue class contains a method named createPayloadUsing which allows you to register a callback that is executed when creating job payloads.
PHP
Go for PHP Developers: Your First Program and a Different Workflow
Start learning Go through familiar PHP concepts. Write and test your first program, understand packages and modules, and compare running source code with building an executable. Read more