marvinosswald/laravel-sns-driver

There is no license information available for the latest version (0.0.2) of this package.

SNS Driver for Illuminate Broadcasting Package

0.0.2 2017-01-07 11:10 UTC

This package is not auto-updated.

Last update: 2024-04-27 17:48:03 UTC


README

This package is currently in an alpha state, and does not yet work in Lumen.

Usage

In config/broadcasting.php set the default driver to 'sns' and add configuration options like this:

'default' => 'sns,
'connections' => [
	...
	'sns' => [
        'driver' => 'sns',
        'aws_key' => env('AWS_SNS_KEY'),
        'aws_secret' => env('AWS_SNS_SECRET'),
        'aws_region' => env('AWS_SNS_REGION')
    ],
    ...
]

In config/app.php, add the SNS Service Provider to your Providers array:

'providers' => [
    ...
    Ringtrail\LaravelSns\SnsBroadcastServiceProvider::class,
    ...
]

Follow the event broadcasting instructions in the Laravel documentation. Your channel will be any SNS topic you've already created in the AWS console.