1. Go to this page and download the library: Download nixphp/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/ */
nixphp / queue example snippets
use NixPHP\Queue\QueueJobInterface;
class SendWelcomeEmail implements QueueJobInterface
{
public function __construct(protected array $payload) {}
public function execute(): void
{
// Send your email here
}
}
use NixPHP\Queue\Core\Queue;
use NixPHP\Queue\Drivers\FileDriver;
app()->container()->set(Queue::class, function () {
return new Queue(
new FileDriver(
app()->getBasePath() . FileDriver::DEFAULT_QUEUE_PATH,
app()->getBasePath() . FileDriver::DEFAULT_DEADLETTER_PATH
)
);
});
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.