PHPackages                             coverzen/sns-fanout-notification - 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. [Mail &amp; Notifications](/categories/mail)
4. /
5. coverzen/sns-fanout-notification

ActivePackage[Mail &amp; Notifications](/categories/mail)

coverzen/sns-fanout-notification
================================

package-description

v1.0.0(8mo ago)01.5k↓50%MITPHPPHP 8.2.\* || 8.3.\*CI passing

Since Sep 15Pushed 8mo agoCompare

[ Source](https://github.com/coverzen/sns-fanout-notification)[ Packagist](https://packagist.org/packages/coverzen/sns-fanout-notification)[ RSS](/packages/coverzen-sns-fanout-notification/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (19)Versions (3)Used By (0)

Laravel notification system for AWS SNS as fanout
=================================================

[](#laravel-notification-system-for-aws-sns-as-fanout)

A Laravel package for sending notifications via AWS SNS (Simple Notification Service) fanout messaging.

Description
-----------

[](#description)

This package provides a custom notification channel for Laravel that enables sending notifications through AWS SNS fanout topics. It allows you to broadcast messages to multiple subscribers simultaneously using AWS SNS topic fanout functionality.

Requirements
------------

[](#requirements)

- PHP 8.2 or 8.3
- Laravel 11.x or 12.x
- AWS SDK for PHP ^3.353

Installation
------------

[](#installation)

Install the package via Composer:

```
composer require coverzen/sns-fanout-notification
```

The service provider will be automatically registered via Laravel's package discovery.

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

[](#configuration)

Configure your AWS SNS credentials in `config/services.php`:

```
'sns' => [
    'key' => env('AWS_ACCESS_KEY_ID'),
    'secret' => env('AWS_SECRET_ACCESS_KEY'),
    'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
    'token' => env('AWS_SESSION_TOKEN'), // Optional for temporary credentials
],
```

Add the corresponding environment variables to your `.env` file:

```
AWS_ACCESS_KEY_ID=your-access-key-id
AWS_SECRET_ACCESS_KEY=your-secret-access-key
AWS_DEFAULT_REGION=us-east-1
```

Usage
-----

[](#usage)

### Creating a Notification

[](#creating-a-notification)

Create a notification class that uses the SNS fanout channel:

```
