Download the PHP package clevyr/laravel-twilio-channel without Composer
On this page you can find all versions of the php package clevyr/laravel-twilio-channel. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download clevyr/laravel-twilio-channel
More information about clevyr/laravel-twilio-channel
Files in clevyr/laravel-twilio-channel
Package laravel-twilio-channel
Short Description A Laravel Notification channel for Twilio
License MIT
Homepage https://github.com/clevyr/laravel-twilio-channel
Informations about the package laravel-twilio-channel
Laravel Twilio Channel
A Laravel Notification channel for sending SMS messages with Twilio.
Installation
You can install the package via composer:
Configure an account on Twilio, and then add the following env vars:
Next, publish the config file with:
This is the contents of the published config file (without descriptive comments):
Usage
In your Laravel notifications:
- Implement the
TwilioNotification
interface - Add the
TwilioChannel
to yourvia
return array value - Build a
toTwilio
function that returns aTwilioMessage
object
By default, the Twilio Channel will use your notifiable's phone_number
field
to send a phone number, which must be in a format such as 18884445555
. See
below how to override this.
Overriding the Notifiable Phone Number Field
By default, TwilioChannel
will use your notifiable's phone_number
field
to send an SMS message. To override this and use a different field, set the
twilioPhoneNumberField
instance variable in your notifiable class:
Testing
Linting
Formatting w/ Laravel Pint
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
- Aaron Krauss
- All Contributors
License
The MIT License (MIT). Please see License File for more information.