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

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

nextsms/laravel
===============

This package makes it easy to send notifications via NextSMS with Laravel

v0.0.7(4y ago)48851MITPHPPHP &gt;=7.4

Since May 13Pushed 4y ago1 watchersCompare

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

READMEChangelog (5)Dependencies (7)Versions (10)Used By (0)

NextSMS notification channel for Laravel
========================================

[](#nextsms-notification-channel-for-laravel)

[![Latest Version on Packagist](https://camo.githubusercontent.com/ee838d8a40219ed5c3efffe88e5dc78fd104d8a605480bc28ab447af60b628dd/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6e657874736d732f6c61726176656c2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/nextsms/laravel)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![PHPUnit tests](https://github.com/nextsms/laravel-nextsms/actions/workflows/tests.yml/badge.svg)](https://github.com/nextsms/laravel-nextsms/actions/workflows/tests.yml)

This package makes it easy to send notifications using [NextSMS](https://nextsms.co.tz/) with Laravel.

Contents
--------

[](#contents)

- [About](#about)
- [Laravel compatibly](#laravel-compatibly)
- [Installation](#installation)
- [Setting up the NextSMS service](#setting-up-the-nextsms-service)
- [Usage](#usage)
- [Testing](#testing)
- [Security](#security)
- [Contributing](#contributing)
- [Credits](#credits)
- [License](#license)

About
-----

[](#about)

The NextSMS channel makes it possible to send out Laravel notifications as `SMS` using NextSMS API.

Laravel compatibly
------------------

[](#laravel-compatibly)

Package is Laravel v8 compatible

Laravel VersionPackage VersionNotesv7 or v8dev-mainLatest versionv66.0.x-devv55.x-devInstallation
------------

[](#installation)

You can install this package via composer:

This will install the latest version

```
composer require nextsms/laravel
```

To install previous version of the package eg: version 6.0.x-dev compatible with laravel v6 see

```
composer require nextsms/laravel:6.0.x-dev
```

The service provider gets loaded automatically.

### Setting up the NextSMS service

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

You will need to [Register](https://nextsms.co.tz/register/).

> Remember to add your Sender ID that you will be using to send the messages.

```
NEXTSMS_USERNAME=""
NEXTSMS_PASSWORD=""
NEXTSMS_FROM=""
NEXTSMS_ENVIROMENT="production"
```

You can publish the package configuration file:

```
php artisan vendor:publish --provider="NotificationChannels\NextSms\NextSmsServiceProvider" --tag="config"
```

Add the `routeNotifcationForNextSms` method on your notifiable Model. If this is not added, the `phone_number` field will be automatically used.

```
