PHP code example of kristianedlund / laravel-external-queue

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

    

kristianedlund / laravel-external-queue example snippets


'providers' => [
    
    'Illuminate\Foundation\Providers\ArtisanServiceProvider',
    'Illuminate\Auth\AuthServiceProvider',
    ...
    
    'Kristianedlund\LaravelExternalQueue\ExternalQueueServiceProvider',

],

'externalsqs' => [
    'driver' => 'externalsqs',
    'key'    => 'your-public-key',
    'secret' => 'your-secret-key',
    'queue'  => 'your-queue-url',
    'region' => 'us-east-1',
],



namespace App\Handlers\ExternalJobs;

use Kristianedlund\LaravelExternalQueue\Contracts\ExternalQueueJobHandler as HandlerContract;
use Illuminate\Queue\Jobs\Job;

class TestJob implements HandlerContract
{
    public function handle(Job $job, $data = null)
    {
        // Do you job handling here
    }
}