PHP code example of henzeb / event-horizon
1. Go to this page and download the library: Download henzeb/event-horizon 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/ */
henzeb / event-horizon example snippets
// Configure different connections for different purposes
config([
'queue.connections.web' => ['connection' => 'redis_web'],
'queue.connections.reports' => ['connection' => 'redis_reports'],
'queue.connections.exports' => ['connection' => 'redis_exports'],
]);
// Jobs show up on the right dashboard where they're processed
Queue::connection('web')->push(new ProcessOrder($order)); // Appears on web dashboard
Queue::connection('reports')->push(new GenerateReport($data)); // Appears on reports dashboard
Queue::connection('exports')->push(new ExportData($params)); // Appears on exports dashboard