Download the PHP package bridit/laravel-sns without Composer

On this page you can find all versions of the php package bridit/laravel-sns. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package 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 & Listeners, make sure you check the documentation section on laravel.com because this package will need you to understand this concept.

Make sure to also check rennokki/laravel-sns-events documentation.

Install

Configuration

You will need an AWS account and make sure you have it properly configured on Laravel, following the steps of official documentation.

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:

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:

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

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

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

The package comes with two event classes:

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

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

License

The MIT License (MIT).


All versions of laravel-sns with dependencies

PHP Build Version
Package Version
Requires php Version ^7.1|^8.0|^8.1
aws/aws-sdk-php-laravel Version ^3.0
illuminate/broadcasting Version ^5.8|^6.0|^7.0|^8.0|^9.0
illuminate/support Version ^5.8|^6.0|^7.0|^8.0|^9.0
rennokki/laravel-sns-events Version ^7.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package bridit/laravel-sns contains the following files

Loading the files please wait ....