Download the PHP package caherrera/laravel-notifications-infobip-omni without Composer
On this page you can find all versions of the php package caherrera/laravel-notifications-infobip-omni. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download caherrera/laravel-notifications-infobip-omni
More information about caherrera/laravel-notifications-infobip-omni
Files in caherrera/laravel-notifications-infobip-omni
Package laravel-notifications-infobip-omni
Short Description A custom Laravel notifications channel for Infobip API OMNI. Based on princeton255/laravel-notifications-infobip
License MIT
Informations about the package laravel-notifications-infobip-omni
Infobip Notifications Channel for Laravel 5.5+
This package makes it easy to send Sms notifications using Infobip service with Laravel 5.5 and above.
Contents
- Installation
- Setting up your Infobip account
- Usage
- Available Message methods
- Examples
- Dispatching the notification
- Example Notification class
- Example Notifiable class
- Testing
- Security
- Credits
- License
Installation
You can install the package via composer:
Setting up your Infobip account
Add this settings to config/services.php
:
To change Base URL
to personal use this (See more)
Usage
Now you can use the channel in your via()
method inside the notification:
In order to let your Notification know which phone are you sending to, the channel will look for the phone_number
attribute of the Notifiable model. If you want to override this behaviour, add the routeNotificationForInfobip
method to your Notifiable model.
Available Message methods
InfobipMessage
setTemplateName('')
: Accepts a string value.setTemplateNamespace('')
: Accepts a string value.setTemplateData(['','',...])
: Accepts an array of string.setLanguage('')
: Accepts a string value
Examples
Dispatching the notification
A. Using Laravel's notification facade
B. Using the notify()
method from Notifiable
trait
Example Notification class
Example Notifiable class
For more details you can check out this link on Laravel documentation
Testing
Security
If you discover any security related issues, please help me and rise a ticket on issue tracker or simply fix it and I'll merge
Credits
- Based on Twilio SMS Notification channel for Laravel
- Based on princeton255/laravel-notifications-infobip Infobip Notifications Channel for Laravel 5.5+
- This project uses the Infobip Client library, and wraps it for smooth use in Laravel
License
The MIT License (MIT).