Download the PHP package nightwriter/laravel-events-to-sns without Composer
On this page you can find all versions of the php package nightwriter/laravel-events-to-sns. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download nightwriter/laravel-events-to-sns
More information about nightwriter/laravel-events-to-sns
Files in nightwriter/laravel-events-to-sns
Package laravel-events-to-sns
Short Description Laravel package to push events to AWS SNS
License MIT
Homepage https://github.com/ralbear/laravel-events-to-sns
Informations about the package laravel-events-to-sns
Laravel events to SNS
This library allow us to send Laravel events to an SNS topic, and receive them through a SQS queue.
Install
Add the provider to config/app.php
Configuration
First step is create this new connection configuration in config/queue.php
AWS credentials
If we use the same AWS account for SNS than for other AWS services on the application, we can use the default env keys for the credentials.
If we need specific credentials for SNS, use this env keys:
Topics
The way this library is designed, define SNS topics based on three parts.
-
A: Use the env variable:
- B: Defined in your event:
The event level topics we use, should be defined as a comma separated value on this env variable:
- D: Use the env variable if need a different value than
APP_ENV
:
This SQS_SNS_ENV
allow us to have custom topics for each environment, if we for example generate new environments for test specific features, we can set here the feature name.
Examples
Event example
Run worker
Run the worker:
Job example
Test
To run test:
ToDo's
- Improve tests and coverage
License
Laravel events to SNS is open-sourced software licensed under the MIT license.
All versions of laravel-events-to-sns with dependencies
ext-json Version *
aws/aws-sdk-php-laravel Version ^3.6
illuminate/support Version ^5.6|^6.0|^7.0|^8.0