GithubHelp home page GithubHelp logo

l9-smsapi-notification-channel's Introduction

Laravel 9 SMSAPI notification channel

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.

l9-smsapi-notification-channel's People

Contributors

procionegobbo avatar stylecibot avatar

Stargazers

carlo briganti avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.