2017 © Pedro Peláez
 

library laravel-notification-channel-turbosms

Turbo SMS Notification channel for Laravel 5.3+.

image

yakimka/laravel-notification-channel-turbosms

Turbo SMS Notification channel for Laravel 5.3+.

  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 1 Open issues
  • 6 Versions
  • 16 % Grown

The README.md

StyleCI Latest Stable Version Total Downloads License, (*1)

Turbo SMS notifications channel for Laravel 5.3+

Based on github.com/laravel-notification-channels/smsc-ru, (*2)

This package made for send notifications using turbosms.ua (SOAP) with Laravel 5.3+, (*3)

Contents

Installation

Firstly you need working soap extension., (*4)

You can install the package via composer: composer require yakimka/laravel-notification-channel-turbosms, (*5)

For Laravel < 5.5 you must install the service provider:, (*6)

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

Setting up the TurboSms service

Add your TurboSms SOAP login, SOAP password and default sender name (or phone number) to your config/services.php:, (*7)

// config/services.php
...
'turbosms' => [
    'login' => env('TURBOSMS_LOGIN'),
    'secret' => env('TURBOSMS_SECRET'),
    'sender' => 'BRAND',
    'url' => 'http://turbosms.in.ua/api/wsdl.html',
],
...

You need to publish Illuminate\Notifications\NotificationServiceProvider files first., (*8)

Usage

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

use Illuminate\Notifications\Notification;
use NotificationChannels\TurboSms\TurboSmsMessage;
use NotificationChannels\TurboSms\TurboSmsChannel;

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

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

In your notifiable model, make sure to include a routeNotificationForTurboSms() method, which return the phone number., (*10)

public function routeNotificationForTurboSms()
{
    return $this->phone;
}

or you can send notification in this way:, (*11)

Notification::route('turbosms', '+380501234567')->notify(new AccountApproved());

or with multiple receivers:, (*12)

Notification::route('turbosms', '+380501234567,+380631234567')->notify(new AccountApproved());

Available methods

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

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

Security

If you discover any security related issues, please email ss.yakim@gmail.com instead of using the issue tracker., (*15)

Contributing

Please see CONTRIBUTING for details., (*16)

Credits

License

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

The Versions

15/03 2018

dev-master

9999999-dev https://github.com/yakimka/laravel-notification-channel-turbosms

Turbo SMS Notification channel for Laravel 5.3+.

  Sources   Download

MIT

The Requires

 

laravel notifications turbosms

15/03 2018

v1.1.3

1.1.3.0 https://github.com/yakimka/laravel-notification-channel-turbosms

Turbo SMS Notification channel for Laravel 5.3+.

  Sources   Download

MIT

The Requires

 

laravel notifications turbosms

29/12 2017

v1.1.2

1.1.2.0 https://github.com/yakimka/laravel-notification-channel-turbosms

Turbo SMS Notification channel for Laravel 5.3+.

  Sources   Download

MIT

The Requires

 

laravel notifications turbosms

29/12 2017

v1.1.1

1.1.1.0 https://github.com/yakimka/laravel-notification-channel-turbosms

Turbo SMS Notification channel for Laravel 5.3+.

  Sources   Download

MIT

The Requires

 

laravel notifications turbosms

29/12 2017

v1.1.0

1.1.0.0 https://github.com/yakimka/laravel-notification-channel-turbosms

Turbo SMS Notification channel for Laravel 5.3+.

  Sources   Download

MIT

The Requires

 

laravel notifications turbosms

08/06 2017

v1.0.0

1.0.0.0 https://github.com/yakimka/laravel-notification-channel-turbosms

Turbo SMS Notification channel for Laravel 5.3+.

  Sources   Download

MIT

The Requires

 

laravel notifications turbosms