PHPackages                             shafimsp/laravel-sms-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. [Logging &amp; Monitoring](/categories/logging)
4. /
5. shafimsp/laravel-sms-notification-channel

ActiveLibrary[Logging &amp; Monitoring](/categories/logging)

shafimsp/laravel-sms-notification-channel
=========================================

Laravel SMS Notification Channel

v1.0.0-alpha07(4y ago)01052MITPHPPHP ^7.3|^8.0

Since Sep 3Pushed 4y ago1 watchersCompare

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

READMEChangelog (7)Dependencies (4)Versions (8)Used By (2)

 SMS Notification Channel for Laravel
--------------------------------------

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

Introduction
------------

[](#introduction)

This package makes it easy to send SMS notifications using different SMS provider with Laravel.

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

[](#installation)

To install the PHP client library using Composer:

```
composer require shafimsp/laravel-sms-notification-channel
```

The package will automatically register itself.

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

[](#configuration)

You can optionally publish the config file with:

```
php artisan vendor:publish --provider="Shafimsp\SmsNotificationChannel\SmsServiceProvider" --tag="config"
```

This is the contents of the published config file:

```
return [
    /*
    |--------------------------------------------------------------------------
    | The default SMS Driver
    |--------------------------------------------------------------------------
    |
    | The default sms driver to use as a fallback when no driver is specified
    | while using the SMS.
    |
    | Supported: "nexmo", "log", "null"
    |
    */
    'default' => env('SMS_DRIVER', 'log'),

    /*
    |--------------------------------------------------------------------------
    | Log Channel
    |--------------------------------------------------------------------------
    |
    | If you are using the "log" driver, you may specify the logging channel
    | if you prefer to keep mail messages separate from other log entries
    | for simpler reading. Otherwise, the default channel will be used.
    |
    */
    'log_channel' => env('SMS_LOG_CHANNEL'),
];
```

Usage
-----

[](#usage)

### Notification

[](#notification)

Set `sms` channel in `via` method on notification class

```
    /**
     * Get the notification's delivery channels.
     *
     * @param  mixed  $notifiable
     * @return array
     */
    public function via($notifiable)
    {
        return ['sms'];
    }
```

and define a toSms method on the notification class.

```
    /**
     * Get the SMS representation of the notification.
     *
     * @param  mixed  $notifiable
     * @return string
     */
    public function toSms()
    {
        return 'Your message content goes here';
    }
```

Or

```
    /**
     * Get the notification's delivery channels.
     *
     * @param  mixed  $notifiable
     * @return string
     */
    public function toSms()
    {
        return (new SmsMessage())
            ->content('Your message goes here');
    }
```

#### Unicode Content

[](#unicode-content)

If your SMS message will contain unicode characters, you should call the unicode method when constructing the SmsMessage instance:

```
    /**
     * Get the notification's delivery channels.
     *
     * @param  mixed  $notifiable
     * @return string
     */
    public function toSms()
    {
        return (new SmsMessage())
            ->content('Your message goes here')
            ->unicode();
    }
```

#### Customizing The "From" Number

[](#customizing-the-from-number)

If you would like to send some notifications from a phone number that is different from the phone number specified in your config/services.php file, you may use the from method on a SmsMessage instance:

```
    /**
     * Get the notification's delivery channels.
     *
     * @param  mixed  $notifiable
     * @return string
     */
    public function toSms()
    {
        return (new SmsMessage())
            ->content('Your message goes here')
            ->unicode();
    }
```

#### Routing SMS Notifications

[](#routing-sms-notifications)

When sending notifications via the `sms` channel, you should define a routeNotificationForSms method on the entity:

```
     /**
     * Route notifications for the Nexmo channel.
     *
     * @param  \Illuminate\Notifications\Notification  $notification
     * @return string
     */
    public function routeNotificationForSms($notification)
    {
        return $this->phone;
    }
```

### Direct method

[](#direct-method)

```
\Shafimsp\SmsNotificationChannel\Facades\Sms::driver('nexmo')
        ->content("Message content goes here")
        ->to('MOBILE_NUMBER_TO_SENT_TO')
        ->send();
```

Security
--------

[](#security)

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

License
-------

[](#license)

Laravel SMS Notification Channel is open-sourced software licensed under the [MIT license](LICENSE.md).

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity54

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 ~107 days

Recently: every ~146 days

Total

7

Last Release

1799d ago

PHP version history (2 changes)v1.0.0-alpha01PHP ^7.1.3

v1.0.0-alpha06PHP ^7.3|^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/e1f9465447567538b9452968f4547310d123922b94842c3fa12feba9e198f9b5?d=identicon)[shafimsp](/maintainers/shafimsp)

---

Top Contributors

[![shafimsp](https://avatars.githubusercontent.com/u/13498024?v=4)](https://github.com/shafimsp "shafimsp (15 commits)")

---

Tags

channelslaravellognexmo-smsnotificationssmssms-notificationsloglaravelnotificationsmsnexmo

### Embed Badge

![Health badge](/badges/shafimsp-laravel-sms-notification-channel/health.svg)

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

###  Alternatives

[yadahan/laravel-authentication-log

Laravel Authentication Log provides authentication logger and notification for Laravel.

416632.8k5](/packages/yadahan-laravel-authentication-log)[spatie/laravel-health

Monitor the health of a Laravel application

85810.0M83](/packages/spatie-laravel-health)[laravel-notification-channels/twilio

Provides Twilio notification channel for Laravel

2587.7M12](/packages/laravel-notification-channels-twilio)[gr8shivam/laravel-sms-api

A modern, flexible Laravel package for integrating any SMS gateway with REST API support

10138.4k](/packages/gr8shivam-laravel-sms-api)[ytake/laravel-fluent-logger

fluent logger for laravel and lumen

63541.6k1](/packages/ytake-laravel-fluent-logger)[guanguans/laravel-exception-notify

Monitor exception and report to the notification channels(Log、Mail、AnPush、Bark、Chanify、DingTalk、Discord、Gitter、GoogleChat、IGot、Lark、Mattermost、MicrosoftTeams、NowPush、Ntfy、Push、Pushback、PushBullet、PushDeer、PushMe、Pushover、PushPlus、QQ、RocketChat、ServerChan、ShowdocPush、SimplePush、Slack、Telegram、WeWork、WPush、XiZhi、YiFengChuanHua、ZohoCliq、ZohoCliqWebHook、Zulip).

14642.7k1](/packages/guanguans-laravel-exception-notify)

PHPackages © 2026

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