PHP code example of soroosh / laravel-bus

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

    

soroosh / laravel-bus example snippets



namespace App\Jobs;

use Soroosh\LaravelBus\Job\DispatchableShouldQueue;
use Illuminate\Bus\Queueable;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Queue\SerializesModels;
use Illuminate\Support\Facades\Log;

class MockJob extends DispatchableShouldQueue
{
    use InteractsWithQueue;
    use Queueable;
    use SerializesModels;

    public function handle()
    {
        Log::info("Hello from MockJob");
    }
}
bash
  php artisan laravel-bus:make-job DummyJob