PHP code example of ayles-software / laravel-cloudflare-queue

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

    

ayles-software / laravel-cloudflare-queue example snippets


'cloudflare' => [
    'driver' => 'cloudflare',
    'account_id'=> env('CLOUDFLARE_ACCOUNT_ID'),
    'queue_id'  => env('CLOUDFLARE_QUEUE_ID'),
    'api_token' => env('CLOUDFLARE_API_TOKEN'),
],

'cloudflare' => [
    'driver' => 'cloudflare',
    'raw_handler' => CloudflareRawJobHandler::class,
    'account_id'=> env('CLOUDFLARE_ACCOUNT_ID'),
    'queue_id'  => env('CLOUDFLARE_QUEUE_ID'),
    'api_token' => env('CLOUDFLARE_API_TOKEN'),
],

class WebhookEmailEvent implements ShouldQueue
{
    use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;

    public function __construct(public readonly array $data)
    {
        //
    }
    
    public function handle()
    {
        // do something
    }
}