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(5y ago)01052MITPHPPHP ^7.3|^8.0

Since Sep 3Pushed 5y 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 3w 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 41% 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

1846d ago

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

v1.0.0-alpha06PHP ^7.3|^8.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/13498024?v=4)[Muhammed Shafi P](/maintainers/shafimsp)[@shafimsp](https://github.com/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

[spatie/laravel-health

Monitor the health of a Laravel application

87411.3M153](/packages/spatie-laravel-health)[laravel/cashier

Laravel Cashier provides an expressive, fluent interface to Stripe's subscription billing services.

2.5k28.4M137](/packages/laravel-cashier)[yadahan/laravel-authentication-log

Laravel Authentication Log provides authentication logger and notification for Laravel.

419662.2k5](/packages/yadahan-laravel-authentication-log)[laravel-notification-channels/twilio

Provides Twilio notification channel for Laravel

2588.1M15](/packages/laravel-notification-channels-twilio)[larabug/larabug

Laravel 6.x/7.x/8.x/9.x/10.x/11.x/12.x/13.x bug notifier

299571.0k1](/packages/larabug-larabug)[gr8shivam/laravel-sms-api

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

10139.9k](/packages/gr8shivam-laravel-sms-api)

PHPackages © 2026

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