PHPackages                             rupeshdahal/nepali-sms-gateway - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. rupeshdahal/nepali-sms-gateway

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

rupeshdahal/nepali-sms-gateway
==============================

Laravel SMS package supporting multiple SMS gateways (SparrowSMS, AkashSMS, FastSMS)

v1.0.2(12mo ago)00MITPHPPHP ^7.4|^8.0

Since May 16Pushed 12mo ago1 watchersCompare

[ Source](https://github.com/rupeshdahal/nepali-sms-gateway)[ Packagist](https://packagist.org/packages/rupeshdahal/nepali-sms-gateway)[ RSS](/packages/rupeshdahal-nepali-sms-gateway/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (5)Versions (4)Used By (0)

Laravel SMS Package
===================

[](#laravel-sms-package)

A Laravel package that provides a simple and consistent way to send SMS messages through multiple SMS gateways.

Currently Supported Gateways
----------------------------

[](#currently-supported-gateways)

- SparrowSMS
- AkashSMS
- FastSMS

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

[](#installation)

You can install the package via composer:

```
composer require rupeshdahal/nepali-sms-gateway
```

Publish Configuration
---------------------

[](#publish-configuration)

Publish the configuration file:

```
php artisan vendor:publish --provider="RupeshDai\NepaliSmsGateway\Providers\SmsServiceProvider"
```

This will create a `config/sms.php` file in your app.

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

[](#configuration)

Set your SMS gateway credentials in your `.env` file:

```
# Default gateway to use
SMS_GATEWAY=sparrow

# Sparrow SMS config
SPARROW_SMS_TOKEN=your_sparrow_token
SPARROW_SMS_FROM=YourSender

# Akash SMS config
AKASH_SMS_AUTH_KEY=your_akash_auth_key
AKASH_SMS_SENDER_ID=YourSenderId

# Fast SMS config
FAST_SMS_API_KEY=your_fast_api_key
FAST_SMS_SENDER=YourSender

# General settings
SMS_LOG_ENABLED=true
SMS_VALIDATE_PHONE_NUMBER=true

```

Usage
-----

[](#usage)

### Basic Usage

[](#basic-usage)

To send an SMS using the default gateway:

```
use RupeshDai\NepaliSmsGateway\Facades\Sms;

// Send a single SMS
$result = Sms::send('9801234567', 'Your message here');

// Send SMS to multiple recipients
$result = Sms::sendMultiple(['9801234567', '9809876543'], 'Your message here');

// Check balance
$balance = Sms::checkBalance();
```

### Specify Gateway

[](#specify-gateway)

You can specify which gateway to use for a specific SMS:

```
$result = Sms::send('9801234567', 'Your message here', [], 'sparrow');
$result = Sms::send('9801234567', 'Your message here', [], 'akash');
$result = Sms::send('9801234567', 'Your message here', [], 'fast');
```

### Additional Options

[](#additional-options)

You can pass additional options to the `send` method:

```
// Override sender ID for this message
$result = Sms::send('9801234567', 'Your message here', [
    'from' => 'CUSTOM'
]);
```

### Error Handling

[](#error-handling)

```
use RupeshDai\NepaliSmsGateway\Exceptions\SmsException;

try {
    $result = Sms::send('9801234567', 'Your message');

    if ($result['success']) {
        // Message sent successfully
    } else {
        // Message failed to send
        // $result['error'] contains the error message
    }
} catch (SmsException $e) {
    // Handle exceptions
    echo $e->getMessage();
}
```

Extending the Package
---------------------

[](#extending-the-package)

### Adding a New Gateway

[](#adding-a-new-gateway)

1. Create a new gateway class that implements `SmsGatewayInterface`
2. Add the gateway configuration to the `config/sms.php` file
3. Update the `SmsManager::resolveGatewayClass()` method to include your new gateway

Example:

```
// Create your gateway class in YourApp\Sms\Gateways\NewGateway.php
namespace YourApp\Sms\Gateways;

use RupeshDai\NepaliSmsGateway\Contracts\SmsGatewayInterface;

class NewGateway implements SmsGatewayInterface
{
    // Implement the required methods
}

// In a service provider, extend the SmsManager
$this->app->extend('sms', function ($manager, $app) {
    $manager->extend('new-gateway', function ($app) {
        return new \YourApp\Sms\Gateways\NewGateway($app['config']['sms.gateways.new-gateway']);
    });

    return $manager;
});
```

Testing
-------

[](#testing)

```
composer test
```

License
-------

[](#license)

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

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance50

Moderate activity, may be stable

Popularity0

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity44

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

Total

3

Last Release

361d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/993488bd5e4a984561eb9e9e9f75a7c2d807611ba23f6074f3b73146d3d31e66?d=identicon)[rupeshdahal](/maintainers/rupeshdahal)

---

Top Contributors

[![rupeshdahal](https://avatars.githubusercontent.com/u/46472234?v=4)](https://github.com/rupeshdahal "rupeshdahal (3 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/rupeshdahal-nepali-sms-gateway/health.svg)

```
[![Health](https://phpackages.com/badges/rupeshdahal-nepali-sms-gateway/health.svg)](https://phpackages.com/packages/rupeshdahal-nepali-sms-gateway)
```

###  Alternatives

[glhd/conveyor-belt

14797.0k](/packages/glhd-conveyor-belt)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

255.2k](/packages/aedart-athenaeum)[ashallendesign/favicon-fetcher

A Laravel package for fetching website's favicons.

190272.4k3](/packages/ashallendesign-favicon-fetcher)[beyondcode/laravel-favicon

Create dynamic favicons based on your environment settings.

37345.5k](/packages/beyondcode-laravel-favicon)[laragear/preload

Effortlessly make a Preload script for your Laravel application.

119363.5k](/packages/laragear-preload)[ankurk91/laravel-ses-webhooks

Handle AWS SES webhooks in Laravel php framework

2534.2k](/packages/ankurk91-laravel-ses-webhooks)

PHPackages © 2026

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