PHP code example of sinemacula / laravel-aws-sns-listener

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

    

sinemacula / laravel-aws-sns-listener example snippets




namespace App\Listeners;

use SineMacula\Aws\Sns\Events\S3NotificationReceived;

final class HandleS3Notification
{
    public function handle(S3NotificationReceived $event): void
    {
        foreach ($event->getNotification()->getRecords() as $record) {
            // Process each S3 record.
        }
    }
}
bash
php artisan vendor:publish --provider="SineMacula\Aws\Sns\SnsServiceProvider"