PHP code example of symfony / amazon-sns-notifier

1. Go to this page and download the library: Download symfony/amazon-sns-notifier 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/ */

    

symfony / amazon-sns-notifier example snippets


use Symfony\Component\Notifier\Message\ChatMessage;
use Symfony\Component\Notifier\Bridge\AmazonSns\AmazonSnsOptions;

$chatMessage = new ChatMessage('Contribute To Symfony');

$options = (new AmazonSnsOptions('topic_arn'))
    ->subject('subject')
    ->messageStructure('json')
    // ...
    ;

// Add the custom options to the chat message and send the message
$chatMessage->options($options);

$chatter->send($chatMessage);