PHPackages                             sashalenz/turbosms-notification-channel - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Mail &amp; Notifications](/categories/mail)
4. /
5. sashalenz/turbosms-notification-channel

ActiveLibrary[Mail &amp; Notifications](/categories/mail)

sashalenz/turbosms-notification-channel
=======================================

Laravel notification channel for the TurboSMS REST API

1.1.0(1mo ago)078MITPHPPHP ^8.2

Since Apr 29Pushed 1mo agoCompare

[ Source](https://github.com/sashalenz/turbosms-notification-channel)[ Packagist](https://packagist.org/packages/sashalenz/turbosms-notification-channel)[ Docs](https://github.com/sashalenz/turbosms-notification-channel)[ RSS](/packages/sashalenz-turbosms-notification-channel/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (4)Dependencies (13)Versions (5)Used By (0)

TurboSMS notification channel for Laravel
=========================================

[](#turbosms-notification-channel-for-laravel)

[![Latest Version on Packagist](https://camo.githubusercontent.com/e6835dda896d47340fdd931b3e054d62279e0518a481e020f920b57232a070c2/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f73617368616c656e7a2f747572626f736d732d6e6f74696669636174696f6e2d6368616e6e656c2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/sashalenz/turbosms-notification-channel)[![Total Downloads](https://camo.githubusercontent.com/a9acf5002e400a50e4f15926ffe62c4f5a52c6fca2ead37b9703ce32fed06ddc/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f73617368616c656e7a2f747572626f736d732d6e6f74696669636174696f6e2d6368616e6e656c2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/sashalenz/turbosms-notification-channel)[![License](https://camo.githubusercontent.com/be4376ee74e685a5bf21434b5970dec0312471e8180f25beeee7f14af3babb7c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f73617368616c656e7a2f747572626f736d732d6e6f74696669636174696f6e2d6368616e6e656c2e7376673f7374796c653d666c61742d737175617265)](LICENSE)

A Laravel notification channel for the [TurboSMS](https://turbosms.ua) REST API.

This is a drop-in replacement for the abandoned [`laravel-notification-channels/turbosms`](https://github.com/laravel-notification-channels/turbosms)package, which still talks to the long-deprecated SOAP endpoint and fails on modern PHP with `SoapClient::__construct(): 'location' and 'uri' options are required in nonWSDL mode`.

Why this package
----------------

[](#why-this-package)

- Talks to the **current** TurboSMS REST API (`https://api.turbosms.ua`), not the dead SOAP endpoint.
- **Won't crash your queue.** Auth, transport, and per-recipient errors are logged at `warning` level instead of being thrown — so a flaky provider or a missing API key cannot drown your worker in retries.
- **Sandbox mode** that short-circuits before any HTTP call — useful for local dev where you don't want to spend credits.
- **Auto-normalises phones** — `+380501234567`, `380501234567`, `+38 (050) 123-45-67` all become `380501234567` before hitting the API.

Installation
------------

[](#installation)

```
composer require sashalenz/turbosms-notification-channel
```

The service provider is registered automatically via package discovery.

Publish the config (optional — env-driven defaults work out of the box):

```
php artisan vendor:publish --tag="turbosms-config"
```

Configuration
-------------

[](#configuration)

Set the following keys in your `.env`:

```
TURBOSMS_API_KEY=your-bearer-token-from-the-dashboard
TURBOSMS_SENDER=YourAlpha

# Optional
TURBOSMS_SANDBOX_MODE=false
TURBOSMS_DEBUG=false
TURBOSMS_BASE_URL=https://api.turbosms.ua
TURBOSMS_TIMEOUT=10
```

The Bearer token is issued in the [TurboSMS dashboard](https://my.turbosms.ua/api).

Usage
-----

[](#usage)

### 1. Notification

[](#1-notification)

Add the channel to your notification's `via()` and implement `toTurboSms`:

```
use Illuminate\Notifications\Notification;
use Sashalenz\TurboSms\TurboSmsChannel;
use Sashalenz\TurboSms\TurboSmsMessage;

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

    public function toTurboSms(object $notifiable): TurboSmsMessage
    {
        return new TurboSmsMessage("Your order #{$notifiable->id} has shipped.");
    }
}
```

> Method names in PHP are case-insensitive, so legacy notifications declaring `toTurboSMS` will keep working without modification.

### 2. Notifiable

[](#2-notifiable)

Provide the recipient phone via `routeNotificationForTurbosms` (or the case-insensitive equivalent `routeNotificationForTurboSMS`). Any common format works — the channel strips non-digit characters before sending:

```
class User extends Authenticatable
{
    use Notifiable;

    public function routeNotificationForTurbosms(): string
    {
        return $this->phone; // '+380501234567' → '380501234567' on the wire
    }
}
```

### 3. Send

[](#3-send)

```
$user->notify(new OrderShipped($order));
```

Sandbox mode
------------

[](#sandbox-mode)

Set `TURBOSMS_SANDBOX_MODE=true` to short-circuit every send. No HTTP request is made; if `TURBOSMS_DEBUG=true` the would-be payload is logged at `info`level. Useful in local/staging environments.

Failure semantics
-----------------

[](#failure-semantics)

The channel is intentionally non-throwing — every failure path logs a warning and returns:

ScenarioResultLog level`sandbox_mode = true`no-op`info` (only if `debug = true`)Empty `api_key` or `sender`no-op`warning`Empty recipient phone or message bodyno-opnoneTransport error (timeout, DNS, refused)no-op`warning`HTTP 401 / 403no-op`warning`Other non-2xxno-op`warning`Envelope `response_code != 0` (e.g. insufficient funds)no-op`warning`Per-recipient `response_code != 0` (e.g. invalid phone)no-op`warning`Successful sendsent`info` (only if `debug = true`)This matches the design constraint that **a misconfigured SMS provider should not block delivery, fiscalisation, or any other queued workflow** that happens to dispatch an SMS as a side-effect.

Testing
-------

[](#testing)

```
composer test
```

Tests use `Http::fake()` and Orchestra Testbench — no real HTTP calls are made.

License
-------

[](#license)

MIT — see [LICENSE](LICENSE).

###  Health Score

43

—

FairBetter than 89% of packages

Maintenance94

Actively maintained with recent releases

Popularity13

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~2 days

Total

4

Last Release

32d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/13202688?v=4)[Oleksandr Petrovskyi](/maintainers/sashalenz)[@sashalenz](https://github.com/sashalenz)

---

Top Contributors

[![sashalenz](https://avatars.githubusercontent.com/u/13202688?v=4)](https://github.com/sashalenz "sashalenz (5 commits)")

---

Tags

laravelnotificationsmsturbosmsukraine

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/sashalenz-turbosms-notification-channel/health.svg)

```
[![Health](https://phpackages.com/badges/sashalenz-turbosms-notification-channel/health.svg)](https://phpackages.com/packages/sashalenz-turbosms-notification-channel)
```

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3325.1M337](/packages/psalm-plugin-laravel)[spatie/laravel-health

Monitor the health of a Laravel application

87311.3M149](/packages/spatie-laravel-health)[defstudio/telegraph

A laravel facade to interact with Telegram Bots

815320.5k3](/packages/defstudio-telegraph)[ralphjsmit/laravel-glide

Auto-magically generate responsive images from static image files.

4923.6k5](/packages/ralphjsmit-laravel-glide)[simplestats-io/laravel-client

Analytics for Laravel. Track visitors, registrations, and payments. Discover which channels actually drive revenue, not just traffic. Server-side, GDPR compliant, ad-blocker proof.

5019.3k](/packages/simplestats-io-laravel-client)[harris21/laravel-fuse

Circuit breaker for Laravel queue jobs. Protect your workers from cascading failures.

24740.3k](/packages/harris21-laravel-fuse)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
