PHP code example of arquivei / laravel-sqs-queue-connector

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

    

arquivei / laravel-sqs-queue-connector example snippets




namespace App\Jobs;

use Illuminate\Bus\Queueable;
use Illuminate\Queue\SerializesModels;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
use SqsQueueConnector\Queue\Contracts\SqsQueueInterface;

class ConsumerJob implements ShouldQueue, SqsQueueInterface
{
    use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;

    private $data;

    public function __construct(\stdClass $data)
    {
        $this->data = $data;
    }

    public function handle()
    {
        print_r([
            'data' => $this->data,
        ]);
    }
}