PHPackages                             laravel-notification-channels/vodafone - 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. laravel-notification-channels/vodafone

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

laravel-notification-channels/vodafone
======================================

Send Laravel Notifications via the Vodafone SMS API

v2.0.0(3y ago)1322MITPHPPHP ^7.2|^8.0CI failing

Since Mar 2Pushed 3y ago4 watchersCompare

[ Source](https://github.com/laravel-notification-channels/vodafone)[ Packagist](https://packagist.org/packages/laravel-notification-channels/vodafone)[ Docs](https://github.com/laravel-notification-channels/vodafone)[ RSS](/packages/laravel-notification-channels-vodafone/feed)WikiDiscussions master Synced yesterday

READMEChangelog (4)Dependencies (5)Versions (5)Used By (0)

Vodafone Notification Channel
=============================

[](#vodafone-notification-channel)

[![Latest Version on Packagist](https://camo.githubusercontent.com/0336f5b7cde2b9c034e6e968b3abf65135413037c9174711da9d7007bbd77c8f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6c61726176656c2d6e6f74696669636174696f6e2d6368616e6e656c732f766f6461666f6e652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/laravel-notification-channels/vodafone)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Build Status](https://camo.githubusercontent.com/21834d982ed3a6a8166da73e1fb1795c6e1b8c11ddd74bc9ee566b55c5593e48/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f6c61726176656c2d6e6f74696669636174696f6e2d6368616e6e656c732f766f6461666f6e652f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/laravel-notification-channels/vodafone)[![StyleCI](https://camo.githubusercontent.com/160b9f370ee1aedd5d4e71ed25a2c6d2098b7370bb66f2702b17cc2c59e65b79/68747470733a2f2f7374796c6563692e696f2f7265706f732f3232393832333536312f736869656c64)](https://styleci.io/repos/229823561)[![Quality Score](https://camo.githubusercontent.com/ba31371af8a317e557881679d3d5d3ea5729ab4ec85b7aaacf5e2e128a7cc9a5/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f6c61726176656c2d6e6f74696669636174696f6e2d6368616e6e656c732f766f6461666f6e652e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/laravel-notification-channels/vodafone)[![Code Coverage](https://camo.githubusercontent.com/859d3425fff4bcba103d3b500f43099dbb4824409b81d594d216df8e9463df15/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f6c61726176656c2d6e6f74696669636174696f6e2d6368616e6e656c732f766f6461666f6e652f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/laravel-notification-channels/vodafone/?branch=master)[![Total Downloads](https://camo.githubusercontent.com/557b19347260d4d9bef058811f11fa558148c6f42ca50c6cc3d8ced4570fd445/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6c61726176656c2d6e6f74696669636174696f6e2d6368616e6e656c732f766f6461666f6e652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/laravel-notification-channels/vodafone)

This package makes it easy to send sms notifications using [Vodafone](https://www.vodafone.com.au/messaging/smser) with Laravel 5.5+ and 6.x

Building on Laravel's Notification channel, this package allows you to send SMS notifications via the Vodafone SMS gateway service.

Sending an SMS to a user becomes as simple as using:

```
$user->notify(new Notification())
```

Contents
--------

[](#contents)

- [Installation](#installation)
    - [Setting up the Vodafone service](#setting-up-the-Vodafone-service)
- [Usage](#usage)
    - [Sending Text Message](#sending-text-message)
        - [Available Message methods](#available-message-methods)
    - [Retrieving Text Messages](#retrieving-text-messages)
- [Changelog](#changelog)
- [Contributing](#contributing)
- [Credits](#credits)
- [License](#license)

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

[](#installation)

Install the package using composer

```
composer require laravel-notification-channels/vodafone
```

Add the configuration to your services.php config file:

```
'vodafone' => [
    'username' => env('VODAFONE_USERNAME'),
    'password' => env('VODAFONE_PASSWORD'),
]
```

### Setting up the Vodafone service

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

Using the Vodafone SMS service requires an account with Vodafone, which can be arranged from this location:

After being provided with your Vodafone account you will receive an API username and password, these need to be entered into your env or config file.

The Vodafone service has the option to send messages with an alpha tag so instead of appearing from a miscellaneous number they come from a pre-defined name.

Usage
-----

[](#usage)

### Sending Text Message

[](#sending-text-message)

Within your notification you need to add the Vodafone channel to your via() method:

```
use Illuminate\Notifications\Notification;
use NotificationChannels\Vodafone\VodafoneChannel;
use NotificationChannels\Vodafone\VodafoneMessage;

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

    public function toVodafone($notifiable)
    {
        return (new VodafoneMessage)
            ->content($this->content)
            ->from('My App');
    }
```

In your notifiable model, make sure to include a `routeNotificationForVodafone()` method, which should return a full mobile number including country code.

```
public function routeNotificationForVodafone()
{
    return $this->phone;
}
```

#### Available Message methods

[](#available-message-methods)

`content()`: Sets the message content of the SMS

`from()`: Sets the qualified sender of the message

### Retrieving Text Messages

[](#retrieving-text-messages)

The VodafoneClient class comes with a 'receive' method for retrieving messages from the Vodafone server.

***Note:** It only returns unread messages and once the Vodafone endpoint has been hit all unread messages are then marked as read. So you only have one opportunity to further process incoming messages.*

```
use NotificationChannels\Vodafone\VodafoneClient;

$vc = new VodafoneClient();
$vc->receive();

// A static method is also available
VodafoneClient::getUnread();
```

Since the Vodafone API only returns one unread message at a time a loop will need to be used to retrieve all the unread messages.

Vodafone will return an Error (code: 201) when there are no more unread messages, so breaking the loop on an Exception means there are no more messages to be retrieved.

```
use NotificationChannels\Vodafone\VodafoneClient;

$ex = false;
do {
    try {
        $message = VodafoneClient::getUnread();
        // Process Message
    } catch (\Exception $ex) {}
} while (!$ex);
```

Changelog
---------

[](#changelog)

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

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

[](#contributing)

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

Credits
-------

[](#credits)

- [Simon Woodard](https://github.com/Human018)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 87.5% 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 ~274 days

Total

4

Last Release

1438d ago

Major Versions

1.2.0 → v2.0.02022-06-05

PHP version history (2 changes)v1.0.0PHP &gt;=7.2

v1.1.0PHP ^7.2|^8.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/20937037?v=4)[Laravel Notification Channels](/maintainers/laravel-notification-channels)[@laravel-notification-channels](https://github.com/laravel-notification-channels)

---

Top Contributors

[![Human018](https://avatars.githubusercontent.com/u/8413094?v=4)](https://github.com/Human018 "Human018 (14 commits)")[![atymic](https://avatars.githubusercontent.com/u/50683531?v=4)](https://github.com/atymic "atymic (2 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/laravel-notification-channels-vodafone/health.svg)

```
[![Health](https://phpackages.com/badges/laravel-notification-channels-vodafone/health.svg)](https://phpackages.com/packages/laravel-notification-channels-vodafone)
```

###  Alternatives

[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)[laravel-notification-channels/discord

Laravel notification driver for Discord.

2371.3M11](/packages/laravel-notification-channels-discord)[laravel-notification-channels/aws-sns

Amazon Simple Notification Service (AWS SNS) notification channel for Laravel.

541.1M2](/packages/laravel-notification-channels-aws-sns)

PHPackages © 2026

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