PHP code example of levmv / mii-queue

1. Go to this page and download the library: Download levmv/mii-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/ */

    

levmv / mii-queue example snippets


class EmailJob extends Job 
{
    public $to;
    public $body;
    
    public function execute($queue)
    {
        Mii::$app->mailer()->to($this->to)->body($body)->send();
    }
}

Mii::$app->emailqueue->push(new EmailJob([
    'to' => '[email protected]',
    'body' => 'Hi guys! Thank you for your framework!',
]));