Smsc notifications channel for Laravel 5.3
PHP
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
src
tests
.editorconfig initial Aug 12, 2016
.gitattributes
.gitignore Formatting and cleanup Aug 13, 2016
.scrutinizer.yml
.styleci.yml
.travis.yml Add code coverage (#10) Aug 16, 2016
CHANGELOG.md
CONTRIBUTING.md
LICENSE.md
README.md
composer.json Work on tests Oct 30, 2016
phpunit.xml Package name and namespace changed Aug 13, 2016

README.md

Smsc notifications channel for Laravel 5.3

Latest Version on Packagist Software License Build Status StyleCI SensioLabsInsight Quality Score Code Coverage Total Downloads

This package makes it easy to send notifications using smsc.ru (aka СМС–Центр) with Laravel 5.3.

Contents

Installation

You can install the package via composer:

composer require laravel-notification-channels/smsc-ru

Then you must install the service provider:

// config/app.php
'providers' => [
    ...
    NotificationChannels\SmscRu\SmscRuServiceProvider::class,
],

Setting up the SmscRu service

Add your SmscRu login, secret key (hashed password) and default sender name (or phone number) to your config/services.php:

// config/services.php
...
'smscru' => [
    'login'  => env('SMSCRU_LOGIN'),
    'secret' => env('SMSCRU_SECRET'),
    'sender' => 'John_Doe'
],
...

Usage

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

use Illuminate\Notifications\Notification;
use NotificationChannels\SmscRu\SmscRuMessage;
use NotificationChannels\SmscRu\SmscRuChannel;

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

    public function toSmscRu($notifiable)
    {
        return SmscRuMessage()::create("Task #{$notifiable->id} is complete!");
    }
}

Available methods

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

content(): Sets a content of the notification message.

Changelog

Please see CHANGELOG for more information what has changed recently.

Testing

$ composer test

Security

If you discover any security related issues, please email jhaoda@gmail.com instead of using the issue tracker.

Contributing

Please see CONTRIBUTING for details.

Credits

License

The MIT License (MIT). Please see License File for more information.