2017 © Pedro Peláez
 

library laravel-notification-smsaero

This package makes it easy to send notifications using smsaero.ru with Laravel 5.3

image

cazzzt/laravel-notification-smsaero

This package makes it easy to send notifications using smsaero.ru with Laravel 5.3

  • Saturday, November 26, 2016
  • by cazzzt
  • Repository
  • 1 Watchers
  • 0 Stars
  • 123 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 9 % Grown

The README.md

SmsAero notifications channel for Laravel 5.3

This package makes it easy to send notifications using smsaero.ru with Laravel 5.3., (*1)

Installation

Require this package in your composer.json and run composer update, (*2)

"cazzzt/laravel-notification-smsaero": "@dev"

Then you must install the service provider:, (*3)

// config/app.php
'providers' => [
    ...
    Cazzzt\SmsAero\SmsAeroServiceProvider::class,
],

Setting up the SmsAero service

Add your SmsAero login, secret key (hashed password), default sign and send channel to your config/services.php:, (*4)

// config/services.php
...
'smsaero' => [
    'user'  => env('SMSAERO_USER'),
    'secret' => env('SMSAERO_SECRET'),
    'sign' => env('SMSAERO_SIGN'),
    'digital' => env('SMSAERO_DIGITAL'),
],
...

Usage

You can use the channel in your via() method inside the notification:, (*5)

use Illuminate\Notifications\Notification;
use Cazzzt\SmsAero\SmsAeroMessage;
use Cazzzt\SmsAero\SmsAeroChannel;

class AccountApproved extends Notification
{
    public function via($notifiable)
    {
        return [SmsAeroChannel::class];
    }

    public function toSmsAero($notifiable)
    {
        return (new SmsAeroMessage())
            ->content('Task #{$notifiable->id} is complete!');
    }
}

Available methods

from(): Sets the sender's name or phone number., (*6)

content(): Sets a content of the notification message., (*7)

Testing

Comming soon.., (*8)

Security

If you discover any security related issues, please email alex.i.lukin@yandex.ru instead of using the issue tracker., (*9)

License

The MIT License (MIT)., (*10)

The Versions

26/11 2016

dev-master

9999999-dev

This package makes it easy to send notifications using smsaero.ru with Laravel 5.3

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar cazzzt