owaslo/textit

Laravel notification channel for textit Sri Lanka

dev-master 2021-08-12 06:03 UTC

This package is auto-updated.

Last update: 2024-05-12 12:05:31 UTC


README

Please see this repo for instructions on how to submit a channel proposal.

Laravel Textit Notification Channel

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

This package makes it easy to send notifications using [Textit](link to service) with Laravel 5.5+, 6.x and 7.x

Contents

Installation

You can install this package via composer:

composer require owaslo/textit

Setting up the Textit service

Add your Textit sms gate user, password and baseurl to your config/services.php:

// config/services.php
...
    'textit' => [
        'user' => env('TEXTIT_USER'),
        'password' => env('TEXTIT_PASSWORD'),
        'baseurl' => env('TEXTIT_BASEURL'),
    ],
...

Usage

You can use the channel in your via() method inside the notification:

use Illuminate\Notifications\Notification;
use NotificationChannels\TurboSMS\TurboSMSMessage;

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

    public function toTextit($notifiable)
    {
        return (new TextitMessage("Your account was approved!"));       
    }
}

Available Message methods

A list of all available options

Changelog

Please see CHANGELOG for more information what has changed recently.

Testing

$ composer test

Security

If you discover any security related issues, please email upeksha@owaslo.com instead of using the issue tracker.

Contributing

Please see CONTRIBUTING for details.

Credits

License

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