Download the PHP package princeton255/laravel-notifications-infobip without Composer
On this page you can find all versions of the php package princeton255/laravel-notifications-infobip. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download princeton255/laravel-notifications-infobip
More information about princeton255/laravel-notifications-infobip
Files in princeton255/laravel-notifications-infobip
Package laravel-notifications-infobip
Short Description A custom Laravel notifications channel for Infobip SMS API
License MIT
Informations about the package laravel-notifications-infobip
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 your Infobip Account Username, Password, and From Number to your 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
from('')
: Accepts a phone to use as the notification sender.content('')
: Accepts a string value for the notification body.
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 email [email protected] instead of using the issue tracker.
Credits
- Based on Twilio SMS Notification channel for Laravel
- This project uses the Infobip Client library, and wraps it for smooth use in Laravel
License
The MIT License (MIT).