PHPackages                             coreproc/laravel-notification-channel-telerivet - 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. coreproc/laravel-notification-channel-telerivet

ActiveLibrary

coreproc/laravel-notification-channel-telerivet
===============================================

This package makes it easy to send notifications using Telerivet with Laravel 5.5+

2.1.1(5y ago)37.0kMITPHPPHP &gt;=7.2CI failing

Since Dec 28Pushed 5y ago4 watchersCompare

[ Source](https://github.com/CoreProc/laravel-notification-channel-telerivet)[ Packagist](https://packagist.org/packages/coreproc/laravel-notification-channel-telerivet)[ Docs](https://github.com/coreproc/laravel-notification-channel-telerivet)[ RSS](/packages/coreproc-laravel-notification-channel-telerivet/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (8)Dependencies (5)Versions (9)Used By (0)

Laravel Telerivet Notification Channel
======================================

[](#laravel-telerivet-notification-channel)

[![Latest Version on Packagist](https://camo.githubusercontent.com/8c573891935b433d9c962e2b7c2cfbafaddf89911a8ab079c1ca0722018e6a2c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f636f726570726f632f6c61726176656c2d6e6f74696669636174696f6e2d6368616e6e656c2d74656c6572697665742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/coreproc/laravel-notification-channel-telerivet)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![StyleCI](https://camo.githubusercontent.com/99a90860e91d546aadab975f9d3f7d1d12f7996eeb55e93d37c354078d6f77f1/68747470733a2f2f7374796c6563692e696f2f7265706f732f3233303632393538372f736869656c64)](https://styleci.io/repos/230629587)[![Quality Score](https://camo.githubusercontent.com/8d3386a0af9749af3cf6241be36383d842e4f0c5a515ed40c4fbfc76ea9b3cea/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f636f726570726f632f6c61726176656c2d6e6f74696669636174696f6e2d6368616e6e656c2d74656c6572697665742e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/coreproc/laravel-notification-channel-telerivet)[![Total Downloads](https://camo.githubusercontent.com/66ccf97743288f089a7a59e4c80ecb18daea3fb03a00871ee879e244244b481a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f636f726570726f632f6c61726176656c2d6e6f74696669636174696f6e2d6368616e6e656c2d74656c6572697665742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/coreproc/laravel-notification-channel-telerivet)

This package makes it easy to send notifications using [Telerivet](https://telerivet.com/) with Laravel 5.5+ and 6.0

Contents
--------

[](#contents)

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

Upgrading from v1.x to v2.x
---------------------------

[](#upgrading-from-v1x-to-v2x)

In v2.x, we've moved the configuration settings of Telerivet from `config/broadcasting.php` to `config/telerivet.php`.

To migrate to v2.x, simply run the following command to get the configuration file:

```
php artisan vendor:publish --provider="CoreProc\NotificationChannels\Telerivet\TelerivetServiceProvider"

```

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

[](#installation)

Install this package with Composer:

```
composer require coreproc/laravel-notification-channel-telerivet

```

Register the ServiceProvider in your config/app.php (Skip this step if you are using Laravel 5.5):

```
CoreProc\NotificationChannels\Telerivet\TelerivetServiceProvider::class,

```

### Setting up the Telerivet service

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

You need to register for an API key and a number for outgoing SMS here:

Once you've registered and set up your project and numbers, get the configuration file by running the following command:

```
php artisan vendor:publish --provider="CoreProc\NotificationChannels\Telerivet\TelerivetServiceProvider"

```

Add the API key and project ID to your configuration in `config/telerivet.php`. You can set the credentials in your `.env` file with the following variables: `TELERIVET_API_KEY` and `TELERIVET_PROJECT_ID`.

Optionally, you can also override these configurations by calling the `setApiKey()` and `setProjectId()` methods in your `TelerivetMessage` object.

Usage
-----

[](#usage)

You can now send SMS via Telerivet by creating a `TelerivetMessage`:

```
use CoreProc\NotificationChannels\Telerivet\TelerivetChannel;
use CoreProc\NotificationChannels\Telerivet\TelerivetMessage;
use Illuminate\Notifications\Notification;

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

    public function toTelerivet($notifiable)
    {
        return (new TelerivetMessage())
            ->setContent('Hello this is a test message');
    }
}
```

You will have to set a `routeNotificationForTelerivet()` method in your notifiable model. For example:

```
class User extends Authenticatable
{
    use Notifiable;

    ....

    /**
     * Specifies the user's mobile number for use in Telerivet
     *
     * @return string
     */
    public function routeNotificationForTelerivet()
    {
        return $this->mobile_number;
    }
}
```

Once you have that in place, you can simply send an SMS notification to the user via

```
$user->notify(new AccountActivated);

```

### Events

[](#events)

You can listen to these event when sending a Telerivet SMS message:

Before an SMS is sent:

`TelerivetSmsSending::class`

When an SMS is sent (this means that the API call to Telerivet was successful):

`TelerivetSmsSent::class`

When an SMS fails to send (this means the API call to Telerivet has failed):

`TelerivetSmsFailed::class`

### Available Message methods

[](#available-message-methods)

All the parameters that can be used for a Telerivet message can be applied through the `TelerivetMessage` object. The documentation from Telerivet can be found here [here](https://telerivet.com/api/rest/curl#Project.sendMessage).

```
setMessageType(?string $messageType)
```

\[Optional\] Type of message to send. If text, will use the default text message type for the selected route.

Possible Values: sms, mms, ussd, call, text

Default: text

```
setContent(?string $content)
```

\[Required if sending SMS message\] Content of the message to send (if message\_type is call, the text will be spoken during a text-to-speech call)

```
setToNumber(?string $toNumber)
```

\[Required if contact\_id not set\] Phone number to send the message to. This is automatically set if you have defined the `routeNotificationForTelerivet()` method in your notifiable object.

```
setContactId(?string $contactId)
```

\[Required if to\_number not set\] ID of the contact to send the message to. This can be automatically set if you have defined a `routeNotificationForTelerivetContactId()` method in your notifiable object.

```
setRouteId(?string $routeId)
```

\[Optional\] ID of the phone or route to send the message from

Default: default sender route ID for your project

```
setStatusUrl(?string $statusUrl)
```

\[Optional\] Webhook callback URL to be notified when message status changes

```
setStatusSecret(?string $statusSecret)
```

\[Optional\] POST parameter 'secret' passed to status\_url

```
setIsTemplate(?bool $isTemplate)
```

\[Optional\] Set to true to evaluate variables like \[\[contact.name\]\] in message content.

(See available variables [here](https://telerivet.com/api/rest/curl#variables))

Default: false

```
setTrackClicks(?bool $trackClicks)
```

\[Optional\] If true, URLs in the message content will automatically be replaced with unique short URLs.

Default: false

```
setMediaUrls(?array $mediaUrls)
```

\[Optional\] URLs of media files to attach to the text message. If message\_type is sms, short links to each media

URL will be appended to the end of the content (separated by a new line).

```
setLabelIds(?array $labelIds)
```

\[Optional\] Array string IDs of [Label](https://telerivet.com/api/rest/curl#Label)

List of IDs of labels to add to this message

```
setVars(?object $vars)
```

\[Optional\] Custom variables to store with the message

```
setPriority(?int $priority)
```

\[Optional\] Priority of the message. Telerivet will attempt to send messages with higher priority numbers first (for example, so you can prioritize an auto-reply ahead of a bulk message to a large group).

Possible Values: 1, 2

Default: 1

```
setSimulated(?bool $simulated)
```

\[Optional\] Set to true to test the Telerivet API without actually sending a message from the route

Default: false

```
setServiceId(?string $serviceId)
```

\[Optional\] string ID of [Service](https://telerivet.com/api/rest/curl#Service)

Service that defines the call flow of the voice call (when message\_type is call)

```
setAudioUrl(?string $audioUrl)
```

\[Optional\] The URL of an MP3 file to play when the contact answers the call (when message\_type is call).

If audio\_url is provided, the text-to-speech voice is not used to say content, although you can optionally use content to indicate the script for the audio.

For best results, use an MP3 file containing only speech. Music is not recommended because the audio quality will be low when played over a phone line.

```
setTtsLang(?string $ttsLang)
```

\[Optional\] The language of the text-to-speech voice (when message\_type is call)

Possible Values: en-US, en-GB, en-GB-WLS, en-AU, en-IN, da-DK, nl-NL, fr-FR, fr-CA, de-DE, is-IS, it-IT, pl-PL, pt-BR, pt-PT, ru-RU, es-ES, es-US, sv-SE

Default: en-US

```
setTtsVoice(?string $ttsVoice)
```

\[Optional\] The name of the text-to-speech voice (when message\_type=call)

Possible Values: female, male

Default: female

Changelog
---------

[](#changelog)

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

Security
--------

[](#security)

If you discover any security related issues, please email to  instead of using the issue tracker.

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

[](#contributing)

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

Credits
-------

[](#credits)

- [Chris Bautista](https://github.com/chrisbjr)
- [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

Maintenance20

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity57

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 ~38 days

Recently: every ~16 days

Total

8

Last Release

2057d ago

Major Versions

1.2.2 → 2.0.02020-08-30

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/7066371?v=4)[CoreProc](/maintainers/coreproc)[@CoreProc](https://github.com/CoreProc)

---

Top Contributors

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

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/coreproc-laravel-notification-channel-telerivet/health.svg)

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

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