PHPackages                             omakei/laravel-nextsms - 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. omakei/laravel-nextsms

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

omakei/laravel-nextsms
======================

A Laravel package to send SMS using NextSMS API

2.0.0(3y ago)5382[2 PRs](https://github.com/omakei/laravel-nextsms/pulls)MITPHPPHP ^8.0

Since Jan 3Pushed 2y ago2 watchersCompare

[ Source](https://github.com/omakei/laravel-nextsms)[ Packagist](https://packagist.org/packages/omakei/laravel-nextsms)[ Docs](https://github.com/omakei/laravel-nextsms)[ GitHub Sponsors](https://github.com/omakei)[ RSS](/packages/omakei-laravel-nextsms/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (5)Dependencies (15)Versions (8)Used By (0)

 [![NextSMS Logo](/art/nextsms-logo.png "NextSMS Logo")](/art/nextsms-logo.png)

Laravel NextSMS
===============

[](#laravel-nextsms)

[![Latest Version on Packagist](https://camo.githubusercontent.com/52813d2135ceab03e492632dc03a7f7b7056adf39847fcbd488c7ebec8e7d3b2/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6f6d616b65692f6c61726176656c2d6e657874736d732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/omakei/laravel-nextsms)[![GitHub Tests Action Status](https://camo.githubusercontent.com/a4dd1065bce5679188096be72de71dee718b02dbea97c7a1e2546b164e6d9cd8/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f6f6d616b65692f6c61726176656c2d6e657874736d732f72756e2d74657374733f6c6162656c3d7465737473)](https://github.com/omakei/laravel-nextsms/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/7059f3c881541a58377838d48690fa5e4f920f0f499f8b9bc47554c6e503f181/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f6f6d616b65692f6c61726176656c2d6e657874736d732f436865636b253230262532306669782532307374796c696e673f6c6162656c3d636f64652532307374796c65)](https://github.com/omakei/laravel-nextsms/actions?query=workflow%3A%22Check+%26+fix+styling%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/d856fd0766349046a78d1efe8a19fddbda51e76040bc56c6c5a4b29c264795e9/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6f6d616b65692f6c61726176656c2d6e657874736d732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/omakei/laravel-nextsms)

Laravel package to send SMS using NextSMS API.

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

[](#installation)

You can install the package via composer:

```
composer require omakei/laravel-nextsms
```

You can publish the config file with:

```
php artisan vendor:publish --tag="nextsms-config"
```

The following keys must be available in your `.env` file:

```
NEXTSMS_USERNAME=
NEXTSMS_PASSWORD=
NEXTSMS_SENDER_ID=
```

This is the contents of the published `config` file:

```
return [
    'username' => env('NEXTSMS_USERNAME', 'NEXTSMS'),
    'password' => env('NEXTSMS_PASSWORD', 'NEXTSMS'),
    'api_key' => base64_encode(env('NEXTSMS_USERNAME', 'NEXTSMS').':'.env('NEXTSMS_PASSWORD', 'NEXTSMS')),
    'sender_id' => env('NEXTSMS_SENDER_ID', 'NEXTSMS'),
    'url' => [
        'sms' => [
            'single' => NextSMS::NEXTSMS_BASE_URL.'/api/sms/v1/text/single',
            'multiple' => NextSMS::NEXTSMS_BASE_URL.'/api/sms/v1/text/multi',
            'reports' => NextSMS::NEXTSMS_BASE_URL.'/api/sms/v1/reports',
            'logs' => NextSMS::NEXTSMS_BASE_URL.'/api/sms/v1/logs',
            'balance' => NextSMS::NEXTSMS_BASE_URL.'/api/sms/v1/balance',
        ],
        'sub_customer' => [
            'create' => NextSMS::NEXTSMS_BASE_URL.'/api/reseller/v1/sub_customer/create',
            'recharge' => NextSMS::NEXTSMS_BASE_URL.'/api/reseller/v1/sub_customer/recharge',
            'deduct' => NextSMS::NEXTSMS_BASE_URL.'/api/reseller/v1/sub_customer/deduct',
        ]
    ],
];
```

Usage
-----

[](#usage)

### Send SMS

[](#send-sms)

#### NB: Telephone Number Must Start with Valid Country Code. Example: 255625933171

[](#nb-telephone-number-must-start-with-valid-country-code-example-255625933171)

Sending single sms to single destination:

```
use Omakei\NextSMS\NextSMS;

$response = NextSMS::sendSingleSMS(['to' => '255625933171', 'text' => 'Dj Omakei is texting.']);
```

Sending single sms to multiple destinations:

```
use Omakei\NextSMS\NextSMS;

$response = NextSMS::sendSingleSMSToMultipleDestination([
            'to' => ['255625933171','255656699895'],
            'text' => 'Dj Omakei is texting.']);
```

Sending multiple sms to multiple destinations (Example 1):

```
use Omakei\NextSMS\NextSMS;

$response = NextSMS::sendMultipleSMSToMultipleDestinations(['messages' => [
                ['to' => '255625933171', 'text' => 'Dj Omakei is texting.'],
                ['to' => '255656699895', 'text' => 'Dj Omakei is texting.']
            ]]);
```

Sending multiple sms to multiple destinations (Example 2):

```
use Omakei\NextSMS\NextSMS;

$response = NextSMS::sendMultipleSMSToMultipleDestinations(['messages' => [
                ['to' => ['255625933171','255656699895'], 'text' => 'Dj Omakei is texting.'],
                ['to' => '255625933171', 'text' => 'Dj Omakei is texting.']
            ]]);
```

Schedule sms:

```
use Omakei\NextSMS\NextSMS;

$response = NextSMS::scheduleSMS([
            'to' => '255625933171',
            'text' => 'Dj Omakei is texting.',
            'date' => '2022-01-25' ,
            'time' => '12:00']);
```

### SMS Delivery Reports

[](#sms-delivery-reports)

Get all delivery reports:

```
use Omakei\NextSMS\NextSMS;

$response = NextSMS::getAllDeliveryReports();
```

Get delivery reports with messageId:

```
use Omakei\NextSMS\NextSMS;

$response = NextSMS::getDeliveryReportWithMessageId(243452542526627);
```

Get delivery reports with messageId:

```
use Omakei\NextSMS\NextSMS;

$response = NextSMS::getDeliveryReportWithSpecificDateRange('2022-01-25', '2022-01-29');
```

### Sent Sms Logs

[](#sent-sms-logs)

Get all sent SMS logs:

```
use Omakei\NextSMS\NextSMS;

$response = NextSMS::getAllSentSMSLogs(10, 5);
```

Get all sent SMS logs with the optional parameter:

```
use Omakei\NextSMS\NextSMS;

$response = NextSMS::getAllSentSMSLogsWithOptionalParameter('255625933171','2022-01-25', '2022-01-29',10, 5);
```

### Sub Customer

[](#sub-customer)

Register Sub Customer:

```
use Omakei\NextSMS\NextSMS;

$response = NextSMS::subCustomerCreate(
            'Michael',
            'Omakei',
            'omakei',
            'omakei96@gmail.com',
            '06259313171',
            'Sub Customer (Reseller)',
            100);
```

Recharge customer:

```
use Omakei\NextSMS\NextSMS;

$response = NextSMS::subCustomerRecharge('omakei96@gmail.com', 100);
```

Deduct a customer:

```
use Omakei\NextSMS\NextSMS;

$response = NextSMS::subCustomerDeduct('omakei96@gmail.com', 100);
```

Get sms balance:

```
use Omakei\NextSMS\NextSMS;

$response = NextSMS::getSMSBalance();
```

NextSMS API Documentation
-------------------------

[](#nextsms-api-documentation)

Please see [NextSMS Developer API](https://documenter.getpostman.com/view/4680389/SW7dX7JL#2936eed4-6027-45e7-92c9-fe1cd7df140b) for more details.

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](.github/CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [omakei](https://github.com/omakei)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

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

Total

5

Last Release

1290d ago

Major Versions

1.1.0 → 2.0.02023-02-04

### Community

Maintainers

![](https://www.gravatar.com/avatar/2ee68680c808759d6c194f584ed624a7d2cea359d0b96f02c2182db0aa06ea16?d=identicon)[omakei](/maintainers/omakei)

---

Top Contributors

[![omakei](https://avatars.githubusercontent.com/u/48096457?v=4)](https://github.com/omakei "omakei (27 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (14 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (12 commits)")[![asantaelly](https://avatars.githubusercontent.com/u/42144545?v=4)](https://github.com/asantaelly "asantaelly (3 commits)")

---

Tags

laravelOmakeilaravel-nextsms

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/omakei-laravel-nextsms/health.svg)

```
[![Health](https://phpackages.com/badges/omakei-laravel-nextsms/health.svg)](https://phpackages.com/packages/omakei-laravel-nextsms)
```

###  Alternatives

[spatie/laravel-health

Monitor the health of a Laravel application

88212.7M188](/packages/spatie-laravel-health)[nativephp/mobile

NativePHP for Mobile

1.1k102.1k146](/packages/nativephp-mobile)[simplestats-io/laravel-client

Server-side analytics for Laravel that follows the full funnel from visit to registration to payment, attributed to the channel that drove it. Revenue, MRR, churn and ad-spend profit (ROAS/CAC) per channel. GDPR compliant, ad-blocker proof.

5226.7k](/packages/simplestats-io-laravel-client)[vormkracht10/laravel-mails

Laravel Mails can collect everything you might want to track about the mails that has been sent by your Laravel app.

25060.1k](/packages/vormkracht10-laravel-mails)[rawilk/profile-filament-plugin

Profile &amp; MFA starter kit for filament.

3915.5k](/packages/rawilk-profile-filament-plugin)[backstage/laravel-mails

Laravel Mails can collect everything you might want to track about the mails that has been sent by your Laravel app.

25094.0k18](/packages/backstage-laravel-mails)

PHPackages © 2026

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