PHP code example of blitz-php / queue

1. Go to this page and download the library: Download blitz-php/queue library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

blitz-php / queue example snippets


// ...

use App\Jobs\Example;

// ...

return [
	// ---
	
	'jobs' => [
		'my-example' => Example::class
	],

	// ---
];

// ...

service('queue')->push('queueName', 'my-example', ['data' => 'array']);
bash
composer 
bash 
php klinge queue:publish
bash
php klinge queue:job Example
bash
php spark queue:work queueName