PHPackages                             norris1z/hubtel-laravel-sms-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. norris1z/hubtel-laravel-sms-channel

ActiveLibrary

norris1z/hubtel-laravel-sms-channel
===================================

Hubtel SMS Channel for Laravel 5.3+

1.9(5y ago)102.5k↓100%6[1 issues](https://github.com/Norris1z/hubtel-laravel-sms-channel/issues)[1 PRs](https://github.com/Norris1z/hubtel-laravel-sms-channel/pulls)MITPHPPHP &gt;=7.2

Since Oct 5Pushed 5y ago2 watchersCompare

[ Source](https://github.com/Norris1z/hubtel-laravel-sms-channel)[ Packagist](https://packagist.org/packages/norris1z/hubtel-laravel-sms-channel)[ Docs](https://github.com/norris1z/hubtel-laravel-sms-channel)[ RSS](/packages/norris1z-hubtel-laravel-sms-channel/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (4)Versions (12)Used By (0)

Hubtel notification channel for Laravel 5.3+
============================================

[](#hubtel-notification-channel-for-laravel-53)

[![Latest Stable Version](https://camo.githubusercontent.com/fdc7cc8671e17c1d6c2866ba9b5994048a958a733e54576009dbe588be9a9c12/68747470733a2f2f706f7365722e707567782e6f72672f6e6f72726973317a2f68756274656c2d6c61726176656c2d736d732d6368616e6e656c2f762f737461626c65)](https://packagist.org/packages/norris1z/hubtel-laravel-sms-channel)[![Total Downloads](https://camo.githubusercontent.com/09d5a8402309512e1f7ba19d318ad801665e095e2b19e271d851a4dabadfac25/68747470733a2f2f706f7365722e707567782e6f72672f6e6f72726973317a2f68756274656c2d6c61726176656c2d736d732d6368616e6e656c2f646f776e6c6f616473)](https://packagist.org/packages/norris1z/hubtel-laravel-sms-channel)[![License](https://camo.githubusercontent.com/a7a7906243799071b96ecf5e08a0f9bf5232499b435f64d3433967aaeaf1e81c/68747470733a2f2f706f7365722e707567782e6f72672f6e6f72726973317a2f68756274656c2d6c61726176656c2d736d732d6368616e6e656c2f6c6963656e7365)](https://packagist.org/packages/norris1z/hubtel-laravel-sms-channel)

This package makes it easy to send notifications using [Hubtel](https://hubtel.com) with Laravel 5.3+.

Contents
--------

[](#contents)

- [Installation](#installation)
    - [Setting up the Hubtel service](#setting-up-the-hubtel-service)
- [Usage](#usage)
    - [Available Message methods](#available-message-methods)
- [Changelog](#changelog)
- [Testing](#testing)
- [Security](#security)
- [Contributing](#contributing)
- [Credits](#credits)
- [License](#license)

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

[](#installation)

To get the latest version of Hubtel Notification channel for Laravel 5.3+, simply require the project using [Composer](https://getcomposer.org):

```
$ composer require norris1z/hubtel-laravel-sms-channel
```

If you use Laravel 5.5+ you don't need the following step. If not, once package is installed, you need to register the service provider. Open up `config/app.php` and add the following to the `providers` key.

- `NotificationChannels\Hubtel\HubtelServiceProvider::class`

### Setting up the Hubtel service

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

In your Hubtel account go to [Applications](https://unity.hubtel.com/account/api-accounts) page. Click on the details of the desired application and copy your `apiKey` and `apiSecret`

In your terminal run

```
$ php artisan vendor:publish --provider="NotificationChannels\Hubtel\HubtelServiceProvider"
```

This creates a `hubtel.php` file in your `config` directory.

Paste your apiCredentials in the `config/hubtel.php` configuration file. You may copy the example configuration below to get started:

```
'account' => [
        'key' => env('HUBTEL_API_KEY'),
        'secret' => env('HUBTEL_API_SECRET')
]
```

Or

Add the `HUBTEL_API_KEY` and `HUBTEL_API_SECRET` to your `.env` file

Usage
-----

[](#usage)

Now you can use the channel in your `via()` method inside the notification:

```
use Illuminate\Notifications\Notification;
use NotificationChannels\Hubtel\HubtelChannel;
use NotificationChannels\Hubtel\HubtelMessage;

class SayHello extends Notification
{
    public function via($notifiable)
    {
        return [HubtelChannel::class];
    }

    public function toSMS($notifiable)
    {
        return (new HubtelMessage)
			->from("JabClari")
			->to("2331234567890")
           	 	->content("Kim Kippo... Sup with you");
    }
}
```

In order to let your Notification know which phone number you are sending to, add the `routeNotificationForSMS` method to your Notifiable model e.g your User Model

```
public function routeNotificationForSMS()
{
    return $this->phone; // where phone is a cloumn in your users table;
}
```

### Available Message methods

[](#available-message-methods)

- `from($from)` : set the sender's name or phone number
- `to($to)` : set the recipient's phone number
- `content($content)` : set the message content
- `registeredDelivery()` : set delivery report request
- `clientReference($reference)` : set the client reference number
- `type($type)` : set the message type to be sent
- `udh($udh)` : set the User Data Header of the SMS Message being sent
- `time($time)` : set the time to deliver the message
- `flashMessage()` : sends the message as a flash message

Read more about the avialable methods on the [Hubtel Documentation Page](https://developers.hubtel.com/documentations/sendmessage)

Changelog
---------

[](#changelog)

Latest Notice
-------------

[](#latest-notice)

For developers who would want to use this package on VPS hosted applications, if the server location is US for which you have a US IP Address, you may need to seek whitelisting of the US Ip address from hubtel by mailing . As i discovered through experience that the package would work fine on local machine because the IP used is a Ghanaian IP address but fails to work on a production server. Note however that this is not a package problem, as the package just organizes components for sending successful SMS messages within Laravel. It is even more challenging to know the cause of the problem when you are using laravel queues, because the response codes are not logged, the queue just logs Processing failed.Hubtels SMS server responds with a 403 Forbidden, when the same SMS is sent directly using Guzzlehttp on the production server (VPS). A 403 HTTP Response according to their website (hubtel) indicates the recipient has not given his/her approval to receive messages which is even more confusing. :)

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)

- [Norris Oduro Tei](https://github.com/Norris1z)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance18

Infrequent updates — may be unmaintained

Popularity27

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 80.8% 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 ~129 days

Recently: every ~111 days

Total

10

Last Release

1976d ago

PHP version history (2 changes)v1.0PHP &gt;=5.6.4

1.8PHP &gt;=7.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/7aa0affe014d465c40939461bbb2d175e64bedb905df2a5a980d87fcc8953631?d=identicon)[Norris1z](/maintainers/Norris1z)

---

Top Contributors

[![Norris1z](https://avatars.githubusercontent.com/u/18237132?v=4)](https://github.com/Norris1z "Norris1z (21 commits)")[![hinimajesty](https://avatars.githubusercontent.com/u/19369546?v=4)](https://github.com/hinimajesty "hinimajesty (5 commits)")

---

Tags

hubtellaravelphpsms

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/norris1z-hubtel-laravel-sms-channel/health.svg)

```
[![Health](https://phpackages.com/badges/norris1z-hubtel-laravel-sms-channel/health.svg)](https://phpackages.com/packages/norris1z-hubtel-laravel-sms-channel)
```

###  Alternatives

[laravel/slack-notification-channel

Slack Notification Channel for laravel.

89069.7M111](/packages/laravel-slack-notification-channel)[spatie/laravel-health

Monitor the health of a Laravel application

85810.0M83](/packages/spatie-laravel-health)[laravel-notification-channels/telegram

Telegram Notifications Channel for Laravel

1.1k3.4M35](/packages/laravel-notification-channels-telegram)[laravel-notification-channels/fcm

FCM (Firebase Cloud Messaging) Notifications Driver for Laravel

5917.0M16](/packages/laravel-notification-channels-fcm)[s-ichikawa/laravel-sendgrid-driver

This library adds a 'sendgrid' mail driver to Laravel.

4139.3M1](/packages/s-ichikawa-laravel-sendgrid-driver)[laravel-notification-channels/microsoft-teams

A Laravel Notification Channel for Microsoft Teams

1603.0M7](/packages/laravel-notification-channels-microsoft-teams)

PHPackages © 2026

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