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 3w 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 72% 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

1624d 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://avatars.githubusercontent.com/u/3900?v=4)[Gus Knowlden](/maintainers/gus)[@gus](https://github.com/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

[defstudio/telegraph

A laravel facade to interact with Telegram Bots

816333.6k3](/packages/defstudio-telegraph)[fleetbase/core-api

Core Framework and Resources for Fleetbase API

1235.9k20](/packages/fleetbase-core-api)[illuminate/notifications

The Illuminate Notifications package.

513.1M1.1k](/packages/illuminate-notifications)[joggapp/laravel-aws-sns

Laravel package for the SNS events by AWS

3178.8k](/packages/joggapp-laravel-aws-sns)[simplestats-io/laravel-client

Server-side analytics for Laravel that follows the full funnel from visit to registration to payment, attributed to the channel that drove it. Revenue, MRR, churn and ad-spend profit (ROAS/CAC) per channel. GDPR compliant, ad-blocker proof.

5021.9k](/packages/simplestats-io-laravel-client)

PHPackages © 2026

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