Download the PHP package hachetaustralia/smsbroadcast without Composer
On this page you can find all versions of the php package hachetaustralia/smsbroadcast. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download hachetaustralia/smsbroadcast
More information about hachetaustralia/smsbroadcast
Files in hachetaustralia/smsbroadcast
Package smsbroadcast
Short Description SMS Broadcast notification channel for Laravel 8
License MIT
Homepage https://github.com/hatchetaustralia/smsbroadcast
Informations about the package smsbroadcast
SMS Broadcast notifications channel for Laravel 8
This package makes it easy to send SMS Broadcast SMS notifications with Laravel 8
Contents
- Requirements
- Installation
- Setting up your SMSBroadcast account
- Using a custom logging channel
- Usage
- Available methods
- Available events
- Changelog
- Testing
- Security
- Contributing
- Credits
- License
Requirements
- Sign up for a free SMS Broadcast account
Installation
You can install the package via composer:
for Laravel 6 and 7, please use the 2.x version of this package. for Laravel 5.8 or lower, please use the 1.x version of this package.
Setting up your SMSBroadcast account
Add the environment variables to your config/services.php
:
Add your SMS Broadcast username and password as well as the default from number/alphanumeric code to your .env
:
Notice: The from can contain a maximum of 11 alphanumeric characters. You can also specify sandbox to true for testing (no post requests are made).
Setup your route on your notifiable
model such as your User with the default destination for that model (single number or array of numbers).
Using a Custom Logging Channel
Debug logs will automatically use your default logging channel, however you can specify a custom logging channel by adding the following to your config/services.php
file:
And the following to your .env
file
Usage
Now you can use the channel in your via()
method inside the notification:
Available methods
Additionally you can add or change recipients (single value or array)
In order to handle a status report you can also set a reference
Maximum message splits are supported as well to determine the maximum number of SMS message credits to use per recipient. This defaults to 1.
You can also delay message sending by a specified number of minutes
Setting a private reference will not transmit to SMS Broadcast and be available should you need it on the MessageWasSent
event as a property of the SMSBroadcastMessage
. This is useful if you want to set something like a foreign key that you can utilise on a listener listening to the MessageWasSent
event.
If you wish to use SMS Broadcast's default two-way SMS number as the from number, simply setNoFrom()
on the message instance
Available events
SMS Broadcast Notification channel comes with handy events which provides the required information about the SMS messages.
- Message Was Sent (
NotificationChannels\SMSBroadcast\Events\MessageWasSent
)
Example:
Changelog
Please see CHANGELOG for more information what has changed recently.
Testing
Security
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
Contributing
Please see CONTRIBUTING for details.
Credits
License
The NoHarm
Licence. Please see License File for more information.
All versions of smsbroadcast with dependencies
illuminate/notifications Version >=8.0
illuminate/support Version >=8.0
illuminate/database Version >=8.0
illuminate/queue Version >=8.0
illuminate/events Version >=8.0
illuminate/log Version >=8.0
guzzlehttp/guzzle Version ^7.2