Send Laravel Notifications via the Vodafone SMS API

v1.0.0 2020-03-02 23:18 UTC

This package is auto-updated.

Last update: 2020-11-03 04:03:43 UTC


Latest Version on Packagist Software License Build Status StyleCI Quality Score Code Coverage Total Downloads

This package makes it easy to send sms notifications using Vodafone 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())



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

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.


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)
            ->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

content(): Sets the message content of the SMS

from(): Sets the qualified sender of the message


Please see CHANGELOG for more information what has changed recently.


Please see CONTRIBUTING for details.



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