New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

yakimka/laravel-notification-channel-turbosms

Turbo SMS Notification channel for Laravel 5.3+.
11,652 2
Install
composer require yakimka/laravel-notification-channel-turbosms
Latest Version:v2.0.1
PHP:>=7.2
Laravel:5 – 8
License:MIT
Last Updated:Apr 13, 2025
Links: GitHub  ·  Packagist
Maintainer: yakimka

StyleCI Latest Stable Version Total Downloads License

Turbo SMS notifications channel for Laravel 5.3+

Based on github.com/laravel-notification-channels/smsc-ru

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

Contents

Installation

Firstly you need working soap extension.

You can install the package via composer: composer require yakimka/laravel-notification-channel-turbosms

For Laravel < 5.5 you must install the service provider:

// 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:

// 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.

Usage

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

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.

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

or you can send notification in this way:

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

or with multiple receivers:

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

Available methods

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

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

Security

If you discover any security related issues, please email ss.yakim@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.

Related Packages

vikki-user/turbosms

TurboSMS Notification notifications driver for Laravel 5.7+.

1,029 0
fenos/notifynder

Management system of internal notifications for Laravel 5.*

207,866 423
carropublic/notifications

A collections of notification channels and senders

48,928 0
uapixart/laravel-turbosms

Turbosms package for Laravel

27,923 7
hugostech/notifynder

Management system of internal notifications for Laravel 10 / 11 / 12 / 13.

4,180 0

Version History

Version Released PHP Laravel License
v2.0.1 >=7.2 5.1 - 5.8|^6.0|^7.0|^8.0 MIT
v2.0.0 >=7.2 5.1 - 5.8|^6.0|^7.0|^8.0 MIT
v1.3 >=5.6.4 ^5.1|^5.2|^5.3|^6.0|^7.0 MIT
v1.2 >=5.6.4 ^5.1|^5.2|^5.3|^6.0|^7.0 MIT
v1.1.3 >=5.6.4 ^5.1|^5.2|^5.3 MIT