procionegobbo/l9-smsapi-notification-channel

This package is abandoned and no longer maintained. The author suggests using the fitprime/l9-smsapi-notification-channel package instead.

SMSAPI notification channel for Laravel 8/9

v1.3.1 2023-03-14 16:58 UTC

This package is auto-updated.

Last update: 2023-03-14 17:00:06 UTC


README

Latest Version on Packagist Software License StyleCI Total Downloads

This package makes it easy to send notifications using SMSAPI with Laravel 9.x

Easy to use notification channel for Laravel 9.x.

$user->notify(new TestSms('This is a test message'));

Contents

Installation

composer require fitprime/l9-smsapi-notification-channel

Create an account on SMSAPI and get your API token. Put your api key in the .env file in the root directory of your application.

SMSAPI_AUTH_TOKEN=<your_auth_token>

Setting up the L9SmsApi service

If you needs to change the default setting for your app you must publish the configuration file.

Usage

Send a message

use Illuminate\Notifications\Notification;
use Fitprime\L9SmsApi\L9SmsApiChannel;
use Fitprime\L9SmsApi\L9SmsApiMessage;

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

    public function toL9Smsapi($notifiable)
    {
        return (new L9SmsApiMessage())
            ->content( 'Text message content' )
            ->to($notifiable->phone_number);
    }
}

Available Message methods

content() set the SMS message content

to() set the SMS message recipient

sender() set the SMS message sender

Changelog

Please see CHANGELOG for more information what has changed recently.

Testing

$ composer test

Security

If you discover any security related issues, please use the issue tracker.

Contributing

Please see CONTRIBUTING for details.

Credits

License

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