PHPackages                             webup/laravel-twilio-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. [Mail &amp; Notifications](/categories/mail)
4. /
5. webup/laravel-twilio-channel

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

webup/laravel-twilio-channel
============================

Laravel's notification channel for twilio

v1.3.0(1y ago)0615↓33.3%MITPHPPHP &gt;=5.5.9

Since Jun 15Pushed 1y ago2 watchersCompare

[ Source](https://github.com/agence-webup/laravel-twilio-channel)[ Packagist](https://packagist.org/packages/webup/laravel-twilio-channel)[ RSS](/packages/webup-laravel-twilio-channel/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (7)Versions (5)Used By (0)

Twilio notifications channel for Laravel 5.3+
=============================================

[](#twilio-notifications-channel-for-laravel-53)

[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)

This was previously the `laravel-notification-channels/twilio:2.0.11` lib

This package makes it easy to send [Twilio notifications](https://documentation.twilio.com/docs) with Laravel 5.3.

Contents
--------

[](#contents)

- [Installation](#installation)
    - [Setting up your Twilio account](#setting-up-your-twilio-account)
- [Usage](#usage)
    - [Available Message methods](#available-message-methods)
- [Changelog](#changelog)
- [Testing](#testing)
- [Security](#security)
- [Contributing](#contributing)
- [Credits](#credits)
- [License](#license)

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

[](#installation)

You can install the package via composer:

```
composer require webup/laravel-twilio-channel
```

Add the service provider (only required on Laravel 5.4 or lower):

```
// config/app.php
'providers' => [
    ...
    Webup\LaravelTwilioChannel\TwilioProvider::class,
],
```

### Setting up your Twilio account

[](#setting-up-your-twilio-account)

Add your Twilio Account SID, Auth Token, and From Number (optional) to your `config/services.php`:

```
// config/services.php
...
'twilio' => [
    'username' => env('TWILIO_USERNAME'), // optional when using auth token
    'password' => env('TWILIO_PASSWORD'), // optional when using auth token
    'auth_token' => env('TWILIO_AUTH_TOKEN'), // optional when using username and password
    'account_sid' => env('TWILIO_ACCOUNT_SID'),
    'from' => env('TWILIO_FROM'), // optional
],
...
```

Usage
-----

[](#usage)

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

```
use Webup\LaravelTwilioChannel\TwilioChannel;
use Webup\LaravelTwilioChannel\TwilioSmsMessage;
use Illuminate\Notifications\Notification;

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

    public function toTwilio($notifiable)
    {
        return (new TwilioSmsMessage())
            ->content("Your {$notifiable->service} account was approved!");
    }
}
```

You can also send an MMS:

```
use Webup\LaravelTwilioChannel\TwilioChannel;
use Webup\LaravelTwilioChannel\TwilioMmsMessage;
use Illuminate\Notifications\Notification;

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

    public function toTwilio($notifiable)
    {
        return (new TwilioMmsMessage())
            ->content("Your {$notifiable->service} account was approved!")
            ->mediaUrl("https://picsum.photos/300");
    }
}
```

Or create a Twilio call:

```
use Webup\LaravelTwilioChannel\TwilioChannel;
use Webup\LaravelTwilioChannel\TwilioCallMessage;
use Illuminate\Notifications\Notification;

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

    public function toTwilio($notifiable)
    {
        return (new TwilioCallMessage())
            ->url("http://example.com/your-twiml-url");
    }
}
```

In order to let your Notification know which phone are you sending/calling to, the channel will look for the `phone_number` attribute of the Notifiable model. If you want to override this behaviour, add the `routeNotificationForTwilio` method to your Notifiable model.

```
public function routeNotificationForTwilio()
{
    return '+1234567890';
}
```

### Available Message methods

[](#available-message-methods)

#### TwilioSmsMessage

[](#twiliosmsmessage)

- `from('')`: Accepts a phone to use as the notification sender.
- `content('')`: Accepts a string value for the notification body.

#### TwilioCallMessage

[](#twiliocallmessage)

- `from('')`: Accepts a phone to use as the notification sender.
- `url('')`: Accepts an url for the call TwiML.

Changelog
---------

[](#changelog)

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)

- [Gregorio Hernández Caso](https://github.com/gregoriohc)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance36

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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 ~401 days

Total

4

Last Release

590d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/addc1cf5f44349ba20c55256d0fed71183ac31489031ae3210b9f3899f0e4f5b?d=identicon)[Agence Webup](/maintainers/Agence%20Webup)

---

Top Contributors

[![Biptaste](https://avatars.githubusercontent.com/u/251481?v=4)](https://github.com/Biptaste "Biptaste (4 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/webup-laravel-twilio-channel/health.svg)

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

###  Alternatives

[laravel-notification-channels/twilio

Provides Twilio notification channel for Laravel

2587.7M12](/packages/laravel-notification-channels-twilio)[laravel-notification-channels/apn

Apple APN Push Notification Channel

2021.9M4](/packages/laravel-notification-channels-apn)[laravel-notification-channels/discord

Laravel notification driver for Discord.

2371.3M11](/packages/laravel-notification-channels-discord)[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/pusher-push-notifications

Pusher native Push Notifications driver.

282733.2k1](/packages/laravel-notification-channels-pusher-push-notifications)[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)
