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)0105MITPHPPHP ^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 today

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

 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

25

—

LowBetter than 39% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity53

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

1750d 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.

417620.3k5](/packages/yadahan-laravel-authentication-log)[ytake/laravel-fluent-logger

fluent logger for laravel and lumen

62538.4k1](/packages/ytake-laravel-fluent-logger)[saasscaleup/laravel-log-alarm

Laravel log Alarm help you to set up alarm when errors occur in your system and send you a notification via Slack and email

27023.6k](/packages/saasscaleup-laravel-log-alarm)[guanguans/laravel-exception-notify

Monitor exception and report to the notification channels(Dump、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).

14241.9k1](/packages/guanguans-laravel-exception-notify)[gr8shivam/laravel-sms-api

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

10238.1k](/packages/gr8shivam-laravel-sms-api)[edujugon/laravel-log

Simple API to write logs for Laravel.

2010.7k](/packages/edujugon-laravel-log)

PHPackages © 2026

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