PHPackages                             laravel-notification-channels/smsapi - 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. laravel-notification-channels/smsapi

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

laravel-notification-channels/smsapi
====================================

Smsapi Notifications Channel for Laravel

0.9.0(1y ago)2577.8k↓24.7%23[3 PRs](https://github.com/laravel-notification-channels/smsapi/pulls)MITPHPPHP &gt;=7.2

Since Apr 24Pushed 1y ago6 watchersCompare

[ Source](https://github.com/laravel-notification-channels/smsapi)[ Packagist](https://packagist.org/packages/laravel-notification-channels/smsapi)[ Docs](https://github.com/laravel-notification-channels/smsapi)[ RSS](/packages/laravel-notification-channels-smsapi/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (5)Versions (14)Used By (0)

Smsapi notifications channel for Laravel
========================================

[](#smsapi-notifications-channel-for-laravel)

[![Latest Version on Packagist](https://camo.githubusercontent.com/81f721bb87fb990f2eec90d2ca068b155400c38fd71a940cfca7e31507680609/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6c61726176656c2d6e6f74696669636174696f6e2d6368616e6e656c732f736d736170692e737667)](https://packagist.org/packages/laravel-notification-channels/smsapi)[![Software License](https://camo.githubusercontent.com/074b89bca64d3edc93a1db6c7e3b1636b874540ba91d66367c0e5e354c56d0ea/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e737667)](LICENSE.md)[![Build Status](https://camo.githubusercontent.com/3c2d0d5d7fdf1bb077b347983655cc362fde2169eb5b36bf978540f4e6ba4576/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f6c61726176656c2d6e6f74696669636174696f6e2d6368616e6e656c732f736d736170692f6d61737465722e737667)](https://travis-ci.org/laravel-notification-channels/smsapi)[![StyleCI](https://camo.githubusercontent.com/5d71fb6ff02e86f38be06fea8091fb59d279de540edb0bb59e9aa19795bf5b4c/68747470733a2f2f7374796c6563692e696f2f7265706f732f38393235373437342f736869656c64)](https://styleci.io/repos/89257474)[![Quality Score](https://camo.githubusercontent.com/05656391cf09d6fba66fa5308c35ca4601d63639c8798d944318baaf943ed52e/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f6c61726176656c2d6e6f74696669636174696f6e2d6368616e6e656c732f736d736170692e737667)](https://scrutinizer-ci.com/g/laravel-notification-channels/smsapi)[![Code Coverage](https://camo.githubusercontent.com/b021ecb445eeb32a96cb20852049cc3b2d60226c75d71a0c551ddb4d325187b8/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6c61726176656c2d6e6f74696669636174696f6e2d6368616e6e656c732f736d736170692f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/laravel-notification-channels/smsapi/?branch=master)[![Total Downloads](https://camo.githubusercontent.com/f859881201c96a7ebaf4811c2a3d64d70c1d76ea2ce7c1e24c6f4d1f44fa0c10/68747470733a2f2f706f7365722e707567782e6f72672f6c61726176656c2d6e6f74696669636174696f6e2d6368616e6e656c732f736d736170692f646f776e6c6f616473)](https://packagist.org/packages/laravel-notification-channels/smsapi)[![PHP 7 ready](https://camo.githubusercontent.com/e1d2589487de24f79afc3d09e18513bf8770abd740be7074cf54641b723a44af/68747470733a2f2f7068703772656164792e74696d6573706c696e7465722e63682f6c61726176656c2d6e6f74696669636174696f6e2d6368616e6e656c732f736d736170692f6d61737465722f62616467652e737667)](https://travis-ci.org/laravel-notification-channels/smsapi)

This package makes it easy to send notifications using [Smsapi](https://www.smsapi.pl/) with Laravel 5.5+, 6.x, &amp; 7.x

Contents
--------

[](#contents)

- [Installation](#installation)
    - [Setting up the Smsapi service](#setting-up-the-smsapi-service)
- [Usage](#usage)
    - [Available Message methods](#available-message-methods)
- [Changelog](#changelog)
- [Testing](#testing)
- [Security](#security)
- [Contributing](#contributing)
- [Credits](#credits)
- [License](#license)

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

[](#installation)

You can install the package via composer:

```
composer require laravel-notification-channels/smsapi
```

You can also publish the config file with:

```
php artisan vendor:publish --provider="NotificationChannels\Smsapi\SmsapiServiceProvider"
```

### Setting up the Smsapi service

[](#setting-up-the-smsapi-service)

Log in to your Smsapi dashboard and configure your preferred authentication method. There is a [polish version](https://ssl.smsapi.pl/) and an [international version](https://ssl.smsapi.com/)which have separated accounts. Set your credentials and defaults in `config/smsapi.php`:

```
'auth' => [
    'method' => 'token',
    // 'method' => 'password',
    'credentials' => [
        'token' => env('SMSAPI_AUTH_TOKEN'),
        // 'username' => env('SMSAPI_AUTH_USERNAME'),
        // 'password' => env('SMSAPI_AUTH_PASSWORD'), // Hashed by MD5
    ],
    // Service of smsapi. Can be SmsapiClient::SERVICE_PL or SmsapiClient::SERVICE_COM.
    'service' => SmsapiClient::SERVICE_PL,
],
'defaults' => [
    'common' => [
        // 'notify_url' => env('SMSAPI_NOTIFY_URL'),
        // 'partner' => env('SMSAPI_PARTNER'),
        // 'test' => env('SMSAPI_TEST', true),
    ],
    'sms' => [
        // 'from' => env('SMSAPI_FROM'),
        // 'fast' => false,
        // 'flash' => false,
        // 'encoding' => 'utf-8',
        // 'normalize' => false,
        // 'nounicode' => false,
        // 'single' => false,
    ],
    'mms' => [
    ],
    'vms' => [
        // 'from' => env('SMSAPI_FROM'),
        // 'tries' => 2,
        // 'interval' => 300,
        // 'tts_lector' => 'Agnieszka',
        // 'skip_gsm' => false,
    ],
],
```

Usage
-----

[](#usage)

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

```
use Illuminate\Notifications\Notification;
use NotificationChannels\Smsapi\SmsapiChannel;
use NotificationChannels\Smsapi\SmsapiSmsMessage;

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

    public function toSmsapi($notifiable)
    {
        return (new SmsapiSmsMessage())->content("Buy now your flight!");
    }
}
```

```
use Illuminate\Notifications\Notification;
use NotificationChannels\Smsapi\SmsapiChannel;
use NotificationChannels\Smsapi\SmsapiMmsMessage;

class AnimalTrespassed extends Notification
{
    public $photoId;

    public function via($notifiable)
    {
        return [SmsapiChannel::class];
    }

    public function toSmsapi($notifiable)
    {
        return (new SmsapiMmsMessage())->subject('Animal!')->smil($this->smil());
    }

    private function smil()
    {
        $url = route('photos', ['id' => $this->photoId]);
        $smil =
            "" .
                "" .
                    "" .
                        "" .
                        "" .
                    "" .
                "" .
                "" .
            "";
        return $smil;
    }
}
```

Add a `routeNotificationForSmsapi` method to your Notifiable model to return the phone number(s):

```
public function routeNotificationForSmsapi()
{
    return $this->phone_number;
}
```

Or add a `routeNotificationForSmsapiGroup` method to return the contacts group:

```
public function routeNotificationForSmsapiGroup()
{
    return $this->contacts_group;
}
```

### Available Message methods

[](#available-message-methods)

#### SmsapiSmsMessage

[](#smsapismsmessage)

- `to(string|string[] $to)`
- `group(string $group)`
- `content(string $content)`
- `template(string $template)`
- `from(string $from)`
- `fast(bool $fast = true)`
- `flash(bool $flash = true)`
- `encoding(string $encoding)`
- `normalize(bool $normalize = true)`
- `nounicode(bool $nounicode = true)`
- `single(bool $single = true)`
- `date(int|string $date)`
- `notifyUrl(string $notifyUrl)`
- `partner(string $partner)`
- `test(bool $test = true)`

#### SmsapiMmsMessage

[](#smsapimmsmessage)

- `to(string|string[] $to)`
- `group(string $group)`
- `subject(string $subject)`
- `smil(string $smil)`
- `date(int|string $date)`
- `notifyUrl(string $notifyUrl)`
- `partner(string $partner)`
- `test(bool $test = true)`

#### SmsapiVmsMessage

[](#smsapivmsmessage)

- `to(string|string[] $to)`
- `group(string $group)`
- `file(string $file)`
- `tts(string $tts)`
- `ttsLector(string $ttsLector)`
- `from(string $from)`
- `tries(int $tries)`
- `interval(int $interval)`
- `skipGsm(bool $skipGsm = true)`
- `date(int|string $date)`
- `notifyUrl(string $notifyUrl)`
- `partner(string $partner)`
- `test(bool $test = true)`

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

Testing
-------

[](#testing)

```
$ composer test
```

Security
--------

[](#security)

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

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Credits
-------

[](#credits)

- [Mateusz Drost](https://github.com/mdrost)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

44

—

FairBetter than 92% of packages

Maintenance47

Moderate activity, may be stable

Popularity43

Moderate usage in the ecosystem

Community22

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 66.1% 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 ~243 days

Recently: every ~208 days

Total

13

Last Release

390d ago

PHP version history (3 changes)0.1.0PHP &gt;=5.6.4

0.4.0PHP &gt;=7.1

0.5.3PHP &gt;=7.2

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/20937037?v=4)[Laravel Notification Channels](/maintainers/laravel-notification-channels)[@laravel-notification-channels](https://github.com/laravel-notification-channels)

---

Top Contributors

[![mdrost](https://avatars.githubusercontent.com/u/4083346?v=4)](https://github.com/mdrost "mdrost (39 commits)")[![atymic](https://avatars.githubusercontent.com/u/50683531?v=4)](https://github.com/atymic "atymic (8 commits)")[![pxlrbt](https://avatars.githubusercontent.com/u/22632550?v=4)](https://github.com/pxlrbt "pxlrbt (4 commits)")[![laravel-shift](https://avatars.githubusercontent.com/u/15991828?v=4)](https://github.com/laravel-shift "laravel-shift (2 commits)")[![mpociot](https://avatars.githubusercontent.com/u/804684?v=4)](https://github.com/mpociot "mpociot (2 commits)")[![gorczakw](https://avatars.githubusercontent.com/u/20668504?v=4)](https://github.com/gorczakw "gorczakw (1 commits)")[![mtawil](https://avatars.githubusercontent.com/u/700753?v=4)](https://github.com/mtawil "mtawil (1 commits)")[![psafarov](https://avatars.githubusercontent.com/u/7732559?v=4)](https://github.com/psafarov "psafarov (1 commits)")[![freekmurze](https://avatars.githubusercontent.com/u/483853?v=4)](https://github.com/freekmurze "freekmurze (1 commits)")

---

Tags

laravelnotificationssmssmsapi

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/laravel-notification-channels-smsapi/health.svg)

```
[![Health](https://phpackages.com/badges/laravel-notification-channels-smsapi/health.svg)](https://phpackages.com/packages/laravel-notification-channels-smsapi)
```

###  Alternatives

[laravel-notification-channels/telegram

Telegram Notifications Channel for Laravel

1.1k3.4M35](/packages/laravel-notification-channels-telegram)[laravel-notification-channels/webpush

Web Push Notifications driver for Laravel.

7984.5M16](/packages/laravel-notification-channels-webpush)[laravel-notification-channels/fcm

FCM (Firebase Cloud Messaging) Notifications Driver for Laravel

5917.0M16](/packages/laravel-notification-channels-fcm)[s-ichikawa/laravel-sendgrid-driver

This library adds a 'sendgrid' mail driver to Laravel.

4139.3M1](/packages/s-ichikawa-laravel-sendgrid-driver)[laravel-notification-channels/twilio

Provides Twilio notification channel for Laravel

2587.7M12](/packages/laravel-notification-channels-twilio)[laravel-notification-channels/apn

Apple APN Push Notification Channel

2021.9M4](/packages/laravel-notification-channels-apn)

PHPackages © 2026

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