PHPackages                             bridit/laravel-sns - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. bridit/laravel-sns

ActiveLibrary[API Development](/categories/api)

bridit/laravel-sns
==================

Laravel Broadcasting SNS

2.2.0(4y ago)15.7k1MITPHPPHP ^7.1|^8.0|^8.1

Since Apr 18Pushed 4y ago1 watchersCompare

[ Source](https://github.com/bridit/laravel-sns)[ Packagist](https://packagist.org/packages/bridit/laravel-sns)[ Docs](https://github.com/bridit/laravel-sns)[ RSS](/packages/bridit-laravel-sns/feed)WikiDiscussions main Synced 1w ago

READMEChangelogDependencies (4)Versions (9)Used By (1)

Laravel SNS
===========

[](#laravel-sns)

Laravel SNS allow you to broadcast and listen to SNS events. It implements a driver on BroadcastManager to make the use of SNS as easy as Laravel Events. It also implements a controller, using `rennokki/laravel-sns-events` package, that is made to properly listen to SNS HTTP(s) webhooks and trigger events on which you can listen to.

If you are not familiar with Laravel Events &amp; Listeners, make sure you check the [documentation section on laravel.com](https://laravel.com/docs/7.x/events) because this package will need you to understand this concept.

Make sure to also check `rennokki/laravel-sns-events` [documentation](https://github.com/rennokki/laravel-sns-events).

Install
-------

[](#install)

```
$ composer require bridit/laravel-sns
```

Configuration
-------------

[](#configuration)

You will need an AWS account and make sure you have it properly configured on Laravel, following the steps of official [documentation](https://github.com/aws/aws-sdk-php-laravel).

Then you need to register a connection for SNS on broadcasting.php, you can do this adding code above on connections section of broadcasting.php:

```
...

'sns' => [
  'driver' => 'sns',
  'route' => '/aws/sns',
  'key' => env('AWS_ACCESS_KEY_ID'), // optional
  'secret' => env('AWS_SECRET_ACCESS_KEY'), // optional
  'region' => env('SNS_REGION'), // optional
  'arn_prefix' => 'arn:aws:sns:' .
    env('AWS_SNS_REGION', env('AWS_REGION', 'us-east-1')) . ':' . env('AWS_ACCOUNT_ID'),
],

```

We made use of env variables to build arn\_prefix, but you can also specify a simple string. You can find your arn on AWS platform, on any topic you own.

This package auto register the necessary routes for you, on web middleware, using 'route' attribute of broadcasting.php. You don't need to do it by yourself.

SNS sends data through POST, so you will need to whitelist your route in your `VerifyCsrfToken.php`:

```
protected $except = [
  ...
  '/aws/sns', // Or other route that you set on broadcasting.php
];
```

If you want this to be your default broadcasting driver set it on your .env:

```
BROADCAST_DRIVER=sns
```

Now you are ready to go. Just create a topic and set up a subscription for HTTP(s) protocol that will point out to the route you just registered. Click the confirmation button from the AWS Dashboard. In a short while, if you implemented the route well, you'll be seeing that your endpoint is registered.

Usage
-----

[](#usage)

To send SNS events just use default Laravel dispatcher, like:

```
event(new OrderShipped($order));

```

The package comes with two event classes:

- `Rennokki\LaravelSnsEvents\Events\SnsNotification` - triggered on each SNS message
- `Rennokki\LaravelSnsEvents\Events\SnsSubscriptionConfirmation` - triggered when the subscription is confirmed

To process the events, you should add the events in your `app/Providers/EventServiceProvider.php`:

```
use Rennokki\LaravelSnsEvents\Events\SnsNotification;
use Rennokki\LaravelSnsEvents\Events\SnsSubscriptionConfirmation;

...

protected $listen = [
    ...
    SnsNotification::class => [
        // add your listeners here for SNS events
    ],
    SnsSubscriptionConfirmation::class => [
        // add your listeners here in case you want to listen to subscription confirmation
    ],
]
```

You will be able to access the SNS message from your listeners like this:

```
class MyListener
{
    ...

    public function handle($event)
    {
        // $event->payload is an array
    }
}
```

License
-------

[](#license)

The MIT License (MIT).

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity70

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~92 days

Recently: every ~150 days

Total

8

Last Release

1578d ago

Major Versions

v1.1.1 → 2.0.02020-11-19

PHP version history (3 changes)v1.0.0PHP ^7.1

2.1.0PHP ^7.1|^8.0

2.2.0PHP ^7.1|^8.0|^8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/f25317b7d4ebde826b405edb882a831dcb3531572b665d5e9d78364c865e5100?d=identicon)[gus](/maintainers/gus)

---

Top Contributors

[![gusiq](https://avatars.githubusercontent.com/u/12137961?v=4)](https://github.com/gusiq "gusiq (9 commits)")

---

Tags

laravelawsSNSBroadcastbridit

### Embed Badge

![Health badge](/badges/bridit-laravel-sns/health.svg)

```
[![Health](https://phpackages.com/badges/bridit-laravel-sns/health.svg)](https://phpackages.com/packages/bridit-laravel-sns)
```

###  Alternatives

[joggapp/laravel-aws-sns

Laravel package for the SNS events by AWS

3171.8k](/packages/joggapp-laravel-aws-sns)[renoki-co/laravel-aws-webhooks

Easy webhook handler for Laravel to catch AWS SNS notifications for various services.

73248.5k](/packages/renoki-co-laravel-aws-webhooks)[pod-point/laravel-aws-pubsub

A Laravel broadcasting driver and queue driver that broadcasts and listens to published events utilising AWS SNS, EventBridge and SQS.

1096.1k](/packages/pod-point-laravel-aws-pubsub)[cion/laravel-text-to-speech

This package creates a shared API to easily use Text to Speech functionalities amongst different TTS providers.

4228.3k](/packages/cion-laravel-text-to-speech)[casperlaitw/laravel-fb-messenger

A Laravel Package to Integrate Facebook Messenger API

10631.5k](/packages/casperlaitw-laravel-fb-messenger)[ankurk91/laravel-ses-webhooks

Handle AWS SES webhooks in Laravel php framework

2534.2k](/packages/ankurk91-laravel-ses-webhooks)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
