PHP code example of anaseqal / laravel-asynq
1. Go to this page and download the library: Download anaseqal/laravel-asynq 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/ */
anaseqal / laravel-asynq example snippets
use AnasEqal\LaravelAsynq\Facades\Asynq;
// Simple task
$taskId = Asynq::enqueueTask(
'email:send',
['to' => '[email protected]']
);
// With options
$taskId = Asynq::enqueueTask(
'report:generate',
['reportId' => 123],
'reports',
[
'delay' => 300,
'retry' => 5,
'timeout' => 1800
]
);
bash
php artisan vendor:publish --provider="AnasEqal\LaravelAsynq\AsynqServiceProvider"