fomvasss/laravel-notification-channel-turbo-sms

This package makes it easy to send notifications using [turbosms.ua](https://turbosms.ua) with Laravel 5.5+

Installs: 5 940

Dependents: 0

Suggesters: 0

Security: 0

Stars: 3

Watchers: 1

Forks: 2

Open Issues: 1

pkg:composer/fomvasss/laravel-notification-channel-turbo-sms

1.5.1 2025-12-31 09:17 UTC

This package is auto-updated.

Last update: 2026-01-23 08:10:34 UTC


README

Here's the latest documentation on Laravel's Notifications System:

https://laravel.com/docs/master/notifications

Latest Version on Packagist Software License Quality Score Code Coverage Total Downloads

This package makes it easy to send notifications using turbosms.ua with Laravel. Send SMS messages, get account balance.

Installation

Install this package with Composer:

composer require fomvasss/laravel-notification-channel-turbo-sms

Configuration

Set API-token, default sender name (or phone number), test mode in config/services.php:

'turbosms' => [
    'api_token'  => env('TURBOSMS_API_TOKEN'),
    'sender'  => env('TURBOSMS_SENDER'),        // For testing use TAXI 
    'is_test'  => env('TURBOSMS_IS_TEST'),      // Do not send real SMS if true
    
    // Optional
    'timeout'  => env('TURBOSMS_TIMEOUT'),
    'connect_timeout'  => env('TURBOSMS_CONNECT_TIMEOUT'),
],

and .env file:

TURBOSMS_API_TOKEN=your_api_token_here
TURBOSMS_SENDER=TAXI
TURBOSMS_IS_TEST=false

Also possible test senders: TAXI, AKCIYA, BEAUTY, Best-offer, Best-Shop, BonusShop, IT Alarm, MAGAZIN, Dostavka24, SERVIS TAXI, BRAND

Usage via notification

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 (new TurboSmsMessage())->content("Hello SMS!!!")->test(true);
    }
}

In your notifiable model, make sure to include a routeNotificationForTurboSms() method, which returns a phone number or an array of phone numbers.

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

Available notify methods

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

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

time(): Example argument = time() + 7*60*60 - Postpone shipping for 7 hours.

test(): Test SMS sending (log)

Usage via service-container

Get balance:

app(TurboSmsApi::class)->getBalance(); // null|float, example 123.45

Send message:

app(TurboSmsApi::class)->sendMessage('380969416874', new \NotificationChannels\TurboSms\TurboSmsMessage('Hello World with Laravel!')); // array, API response

Changelog

Please see CHANGELOG for more information what has changed recently.

Security

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