PHPackages                             navraj-sharma/sparrowsms - 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. navraj-sharma/sparrowsms

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

navraj-sharma/sparrowsms
========================

Sparrow SMS notification channel for Laravel

013PHP

Since Jul 2Pushed 5y ago1 watchersCompare

[ Source](https://github.com/navraj-sharma/sparrowsms)[ Packagist](https://packagist.org/packages/navraj-sharma/sparrowsms)[ RSS](/packages/navraj-sharma-sparrowsms/feed)WikiDiscussions main Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

SparrowSMS Notifications Channel for Laravel
============================================

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

This package makes it easy to send notifications using [SparrowSMS](https://sparrowsms.readthedocs.io) with Laravel 5.5+, 6.0 and 7.0

Contents
--------

[](#contents)

- [Installation](#installation)
    - [Setting up the SparrowSMS service](#setting-up-the-SparrowSMS-service)
- [Usage](#usage)
    - [ On-Demand Notifications](#on-demand-notifications)
- [Changelog](#changelog)
- [Testing](#testing)
- [Security](#security)
- [Contributing](#contributing)
- [Credits](#credits)
- [License](#license)

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

[](#installation)

You can install this package via composer:

```
composer require navraj-sharma/sparrowsms
```

### Setting up the SparrowSMS service

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

Add your SparrowSMS configurations to your config/sparrowsms.php:

```
// config/sparrowsms.php
...
    return [
    'token' => env('SPARROWSMS_TOKEN'),
    'from' => env('SPARROWSMS_FROM'),
    'api_endpoint' => env('SPARROWSMS_API_ENDPOINT', 'http://api.sparrowsms.com/v2/'),
    'sandbox' =>  env('SPARROWSMS_SANDBOX', false),

    'methods' => [
        'send' => 'sms/',
        'credit' => 'credit/'
    ],

    'debug' =>  env('APP_DEBUG', false),
]
...
```

Usage
-----

[](#usage)

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

```
use Illuminate\Notifications\Notification;
use NavrajSharma\SparrowSMS\SparrowSMSMessage;

class SendSMS extends Notification
{
    public function via($notifiable)
    {
        return ["sparrowsms"];
    }

    public function toSparrowSMS($notifiable)
    {
        return (new SparrowSMSMessage("SMS Sent Via SparrowSMS Service"));
    }
}
```

In your notifiable model, make sure to include a routeNotificationForSparrowSMS() method, which returns a phone number or an array of phone numbers.

```
public function routeNotificationForSparrowSMS()
{
    return $this->mobile;
}
```

### On-Demand Notifications

[](#on-demand-notifications)

Sometimes you may need to send a notification to someone who is not stored as a "user" of your application. Using the Notification::route method, you may specify ad-hoc notification routing information before sending the notification:

```
Notification::route('sparrowsms', '9801110000')
            ->notify(new SendSMS());
```

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)

- [Niranjan Udas](https://github.com/niranjan)

License
-------

[](#license)

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

###  Health Score

17

—

LowBetter than 6% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity30

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/386ff70b2e6a8d4aff12ea5633a275c0107e87ea7ba82b91bc0d76b3435aa3d1?d=identicon)[navraj-sharma](/maintainers/navraj-sharma)

---

Top Contributors

[![navraj-sharma](https://avatars.githubusercontent.com/u/446163?v=4)](https://github.com/navraj-sharma "navraj-sharma (8 commits)")

### Embed Badge

![Health badge](/badges/navraj-sharma-sparrowsms/health.svg)

```
[![Health](https://phpackages.com/badges/navraj-sharma-sparrowsms/health.svg)](https://phpackages.com/packages/navraj-sharma-sparrowsms)
```

###  Alternatives

[bigbharatjain/laravel-clickatell

This package makes it easy to send sms using clickatell.com with Laravel 5.

1435.2k](/packages/bigbharatjain-laravel-clickatell)[motomedialab/smtp2go

Send emails via API using the first-class email courier SMTP2Go

1323.6k](/packages/motomedialab-smtp2go)

PHPackages © 2026

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