Download the PHP package infinitypaul/laravel-notification-channel-termii without Composer
On this page you can find all versions of the php package infinitypaul/laravel-notification-channel-termii. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download infinitypaul/laravel-notification-channel-termii
More information about infinitypaul/laravel-notification-channel-termii
Files in infinitypaul/laravel-notification-channel-termii
Package laravel-notification-channel-termii
Short Description Termii SMS/Whatsapp Channel for Laravel
License MIT
Homepage https://github.com/infinitypaul/laravel-notification-channel-termii
Informations about the package laravel-notification-channel-termii
Termii notifications channel for Laravel
This package brings you the joy of sending Termii notifications with Laravel, with the same effortlessness as a Sunday morning coffee. Take a sip and let's get started.
Contents
- Installation
- Setting up your Termii account
- Usage
- Available Message methods
- Changelog
- Testing
- Security
- Contributing
- Credits
- License
Installation
You can install the package faster than you can say "composer" via composer:
Service providers... You gotta love them. You either have to install them yourself, or if you're living on the edge with Laravel 5.5 or higher, let the package auto discovery do the work for you:
Setting up your Termii account
Time to tell Laravel your deepest secret (aka your Termii API Key). Also, add your favorite channel and an optional Sender ID. Whisper these to your config/services.php:
Usage
The next step is as easy as pie. Simply use the channel in your via() method inside the notification:
Let's tell your Notification where it's heading(which phone are you sending to). Add the routeNotificationForTermii method to your Notifiable model (e.g., your User Model).
or you can also just send it from TermiiMessage
class in your toTermii()
implementation.
Available Message methods
TermiiMessage
from('')
: Accepts a string -Represents a sender ID for sms which can be Alphanumeric or Device name for Whatsapp. Alphanumeric sender ID length should be between 3 and 11 characters (Example:CompanyName).to('')
: Accepts a string - Represents a destination ID for sms in international format (Example: 2338013828492). It is optional, and can be set in the notifable modelrouteNotificationForTermii()
.content('')
: Accepts a string - Text of a message that would be sent to the destination phone number.channel('')
: Accepts a string This is the route through which the message is sent. It is eitherdnd
,whatsapp
, orgeneric
, by default it is dnd.media('')
: Accepts an array, if your channel iswhatsapp
This is a media object, it is only available for the High Volume WhatsApp. When using the media parameter, ensure you are not using the sms parameter.media_url('')
: Accepts a string, if your channel iswhatsapp
The url to the file resource,.media_option('')
: Accepts a string, if your channel iswhatsapp
The caption that should be added to the image,.
Changelog
Curious about our termii journey? Check out CHANGELOG for more information on what has changed recently.
Testing
Security
Discovered any security issues? Please email us at [email protected]. We promise to take it seriously, instead of using the issue tracker..
Credits
License
The MIT License (MIT). Please see License File for more information.