PHP code example of humolot / ci4-bus

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

    

humolot / ci4-bus example snippets


php spark bus:install

app/Jobs/
app/Jobs/JobInterface.php
app/Jobs/BaseJob.php
app/Config/Bus.php
migrations for jobs & failed_jobs

php spark migrate

php spark bus:make SendEmailJob

namespace App\Jobs;

class SendEmailJob extends BaseJob
{
    public function handle(array $data)
    {
        // Your logic here
    }
}

php spark bus:work

php spark bus:failed
php spark bus:failed:retry 12
php spark bus:retry-all
php spark bus:failed:clear

php spark bus:clear

app/Jobs/
app/Config/Bus.php
app/Models/
app/Libraries/Bus.php (auto-published)