1. Go to this page and download the library: Download nipwaayoni/laravel-aws-sns 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/ */
nipwaayoni / laravel-aws-sns example snippets
use Nipwaayoni\SnsHandler\Events\SnsMessageReceived;
use App\Listeners\MySnsMessageHandler;
/**
* The event listener mappings for the application.
*
* @var array
*/
protected $listen = [
SnsMessageReceived::class => [
MySnsMessageHandler::class,
],
];
public function handle(SnsMessageReceived $event)
{
$message = $event->message();
// do stuff with message
$content = $message->content();
}
use Nipwaayoni\Tests\SnsHandler\SnsHttpTestHelperTrait;
public function testSnsRequestMapping(): void
{
Bus::fake();
$data = "Bob";
$this->sendSnsMessage($data);
Bus::assertDispatched(SayHelloJob::class);
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.