Skip to content

[WIP] Integrate AWS SDK to Laravel and some helper for SNS service

License

Notifications You must be signed in to change notification settings

oanhnn/laravel-aws

Repository files navigation

Laravel AWS

Build Status Coverage Status Latest Version Software License

Easy working with AWS SDK and SNS service for Your Laravel 5.4+ Application.

Main features

  • Integrate AWS SDK to Laravel
  • SNS Message handler

TODO

  • Add unit test scripts
  • Make better document

Requirements

  • php >=7.0
  • Laravel 5.4+

Installation

Composer

Begin by pulling in the package through Composer.

$ composer require oanhnn/laravel-aws

Service Provider and Facade

Next, if using Laravel 5.5+, you done.

If using Laravel 5.4, You must find the providers key in your config/app.php and register the AWS Service Provider.

// config/app.php

    'providers' => [
        // ...
        Laravel\Aws\AwsServiceProvider::class,
    ],

Find the aliases key in your config/app.php and add the AWS facade alias.

// config/app.php

    'aliases' => array(
        // ...
        'AWS' => Laravel\Aws\Facades\Aws::class,
    )

Config file

Publish package config file with the command:

$ php artisan vendor:publish --provider="Laravel\Aws\AwsServiceProvider"

Usage

Events

ConfirmationReceived event

This event class is parent class of two event classes: SubscriptionConfirmationReceived and UnsubscribeConfirmationReceived. You can listen this event to listen two child events. Eg. ConfirmationHandler class handle those, it will send request to SubscribeURL.

SubscriptionConfirmationReceived event

This event will be fire when WebHook received a message type SubscriptionConfirmation

UnsubscribeConfirmationReceived event

This event will be fire when WebHook received a message type UnsubscribeConfirmation

NotificationReceived event

This event will be fire when WebHook received a message type Notification. You can listen this for your application logic. Eg. Handle video processing successful by Elastic Transcoding

Config File

Changelog

See all change logs in CHANGELOG

Testing

$ git clone [email protected]/oanhnn/laravel-aws.git /path
$ cd /path
$ composer install
$ composer phpunit

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email to Oanh Nguyen instead of using the issue tracker.

Credits

License

This project is released under the MIT License.
Copyright © 2018 Oanh Nguyen.

About

[WIP] Integrate AWS SDK to Laravel and some helper for SNS service

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages