PHPackages                             thinkstudeo/textlocal-notification-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. thinkstudeo/textlocal-notification-channel

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

thinkstudeo/textlocal-notification-channel
==========================================

Laravel notification channel for Textlocal Api

1.0.0(7y ago)02.9k1MITPHPPHP &gt;=5.6

Since Apr 23Pushed 7y agoCompare

[ Source](https://github.com/thinkstudeo/textlocal-notification-channel)[ Packagist](https://packagist.org/packages/thinkstudeo/textlocal-notification-channel)[ Docs](https://github.com/thinkstudeo/textlocal-notification-channel)[ RSS](/packages/thinkstudeo-textlocal-notification-channel/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependencies (7)Versions (2)Used By (1)

Textlocal Notification Channel for Laravel 5.6+.
================================================

[](#textlocal-notification-channel-for-laravel-56)

[![Latest Version on Packagist](https://camo.githubusercontent.com/ea291334d337068b67df3944e4de56c52bac4f799ad05c38101226b1b4490fd6/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7468696e6b73747564656f2f746578746c6f63616c2d6e6f74696669636174696f6e2d6368616e6e656c2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/thinkstudeo/textlocal-notification-channel)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Build Status](https://camo.githubusercontent.com/7f15f615e949edd82a4312556fb9d7dfc099119344741b7d709c9e15c3b8f1c4/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f7468696e6b73747564656f2f746578746c6f63616c2d6e6f74696669636174696f6e2d6368616e6e656c2f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/thinkstudeo/textlocal-notification-channel)[![StyleCI](https://camo.githubusercontent.com/524e0b42c940bd706350117ffbc0365dff2b7421fc819213a5482ecffb313d2b/68747470733a2f2f7374796c6563692e696f2f7265706f732f3138333035333432362f736869656c64)](https://styleci.io/repos/183053426)[![SymfonyInsight](https://camo.githubusercontent.com/6b88ce9ca98e18bd1f7df7d3db405a48178fbd822bb34e7889d4e526495a4b80/68747470733a2f2f696e73696768742e73796d666f6e792e636f6d2f70726f6a656374732f35613766386163372d653232342d343739342d383763342d3235366364623564376261312f6d696e692e737667)](https://insight.symfony.com/projects/5a7f8ac7-e224-4794-87c4-256cdb5d7ba1)[![Quality Score](https://camo.githubusercontent.com/fc192f2dda0b20c23eeac4962c07535eb17375866b2b73bf3f7106b6ac4e4c99/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f7468696e6b73747564656f2f746578746c6f63616c2d6e6f74696669636174696f6e2d6368616e6e656c2e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/thinkstudeo/textlocal-notification-channel)[![Total Downloads](https://camo.githubusercontent.com/450896c58914081037657ea3fabc4c40628f8b86d151b7e3f83445f8817b593e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7468696e6b73747564656f2f746578746c6f63616c2d6e6f74696669636174696f6e2d6368616e6e656c2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/thinkstudeo/textlocal-notification-channel)

This package makes it easy to send notifications using [Textlocal](https://textlocal.com) with Laravel 5.6+

Supports using both Transactional and Promotional accounts with Textlocal at the same time.

Contents
--------

[](#contents)

- [Textlocal Notification Channel for Laravel 5.6+.](#textlocal-notification-channel-for-laravel-56)
    - [Contents](#contents)
    - [Installation](#installation)
        - [Setting up the Textlocal service](#setting-up-the-textlocal-service)
    - [Usage](#usage)
        - [Using Textlocal Promotional Account](#using-textlocal-promotional-account)
        - [Using Textlocal Transactional Account](#using-textlocal-transactional-account)
    - [Changelog](#changelog)
    - [Testing](#testing)
    - [Security](#security)
    - [Contributing](#contributing)
    - [Credits](#credits)
    - [License](#license)

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

[](#installation)

```
composer require thinkstudeo/textlocal-notification-channel
```

Taking advantage of automatic package discovery available since Laravel 5.5, the service provider will be registered automatically.

### Setting up the Textlocal service

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

Add your textlocal accounts, api url and credentials in the `config/services.php` file. The url is required to be set in the config file because, textlocal has different urls for different countries. Atleast for India, its different. `https://api/textlocal.in/send/`

```
...
'textlocal' => [
    'url' => 'https://api.textlocal.com/send/'	//or 'https://api.textlocal.in/send/ - for India

    //Textlocal Transactional Account
    'transactional' => [
        'apiKey' => env('TEXTLOCAL_TRANSACTIONAL_KEY'),
        'from' => env('TEXTLOCAL_TRANSACTIONAL_FROM', 'TXTLCL')
	],

    //Textlocal Promotional Account
    'promotional' => [
        'apiKey' => env('TEXTLOCAL_PROMOTIONAL_KEY'),
        'from' => env('TEXTLOCAL_PROMOTIONAL_FROM', 'TXTLCL')
    ]
],
...
```

Don't forget to add the keys to your `.env` file

```
...
TEXTLOCAL_TRANSACTIONAL_KEY=
TEXTLOCAL_TRANSACTIONAL_FROM=
TEXTLOCAL_PROMOTIONAL_KEY=
TEXTLOCAL_PROMOTIONAL_FROM=
...

```

Usage
-----

[](#usage)

To use the channel, include the `NotificationChannels\Textlocal\TextlocalChannel` class in the `via()` method of your notification class.

### Using Textlocal Promotional Account

[](#using-textlocal-promotional-account)

```
use Illuminate\Notifications\Notification;
use NotificationChannels\Textlocal\TextlocalChannel;
use NotificationChannels\Textlocal\TextlocalMessage;

class SendBlackFridaySaleAnnouncement extends Notification
{
    /**
     * Get the notification's delivery channels.
     *
     * @param  mixed  $notifiable
     * @return array
     */
    public function via($notifiable)
    {
        return [TextlocalChannel::class];
    }

    /**
     * Get the Textlocal / SMS representation of the notification.
     *
     * @param  mixed  $notifiable
     * @return NexmoMessage
     */
    public function toTextlocal($notifiable)
    {
        return (new TextlocalMessage())
            //Required
            // To send sms via your Textlocal promotional account
            //or transactional() to sent via Textlocal transactional account
            ->promotional()

            //Optional
            //If you don't provide a from, it will pick up the value from the config
            ->from('TXTLCL')

            //Optional
            //If you want to send a copy of the sms to another number eg an Admin
            ->cc('914545454545')

            //Required
            ->content('We are running a BlackFriday sale from tomorrow for 3 days with 40% off. Hurry !!! Grab the opportunity!');
    }
}
```

### Using Textlocal Transactional Account

[](#using-textlocal-transactional-account)

```
use Illuminate\Notifications\Notification;
use NotificationChannels\Textlocal\TextlocalChannel;
use NotificationChannels\Textlocal\TextlocalMessage;

class SendLoginOtp extends Notification
{
    /**
     * Get the notification's delivery channels.
     *
     * @param  mixed  $notifiable
     * @return array
     */
    public function via($notifiable)
    {
        return [TextlocalChannel::class];
    }

    /**
     * Get the Textlocal / SMS representation of the notification.
     *
     * @param  mixed  $notifiable
     * @return NexmoMessage
     */
    public function toTextlocal($notifiable)
    {
        return (new TextlocalMessage())
            //Required
            // To send sms via your Textlocal transactional account
            //or promotional() to sent via Textlocal promotional account
            ->transactional()

            //Optional
            //If you don't provide a from, it will pick up the value from the config
            ->from('TXTLCL')

            //Optional
            //If you want to send a copy of the sms to another number eg an Admin
            ->cc('914545454545')

            //Required
            //When sending through Textlocal transactional account, the content must conform to one of your approved templates.
            ->content('Your OTP for Application is 234567. It is valid for the next 10 minutes only.');
    }
}
```

Changelog
---------

[](#changelog)

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

Testing
-------

[](#testing)

Fill in the `env` values in the `phpunit.xml.dist`. The tests depends on these values.

```

```

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

- [Neerav Pandya](https://github.com/neeravp)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity54

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

Unknown

Total

1

Last Release

2573d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/fcecab1edd1578fc793f2f1619445d4cf68ab51f9c755ae547257902f771b744?d=identicon)[thinkstudeo](/maintainers/thinkstudeo)

---

Top Contributors

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

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/thinkstudeo-textlocal-notification-channel/health.svg)

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

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