This package makes it easy to send Twilio WhatsApp notifications with 8.x, 9.x & 10.x
- PHP 8.1 or later.
Install it using Composer:
composer require bhanwarpsrathore/laravel-notification-twilio-whatsapp
Add your Twilio Account SID, Auth Token, and From Number to your .env
:
TWILIO_USERNAME=XYZ # optional when using auth token
TWILIO_PASSWORD=ZYX # optional when using auth token
TWILIO_AUTH_TOKEN=ABCD # optional when using username and password
TWILIO_ACCOUNT_SID=1234 # always required
TWILIO_WHATSAPP_FROM=+11111111 # always required
You can optionally publish the config file with:
php artisan vendor:publish --provider="TwilioWhatsApp\TwilioWhatsAppProvider" --tag="config"
Publish the config using the above command, and edit the ignored_error_codes
array. You can get the list of
exception codes from the documentation.
If you want to suppress all errors, you can set the option to ['*']
. The errors will not be logged.
MIT license. Please see LICENSE.md for more info.