Download the PHP package laravel-notification-channels/twilio without Composer

On this page you can find all versions of the php package laravel-notification-channels/twilio. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package twilio

Twilio notifications channel for Laravel

Latest Version on Packagist Build Status StyleCI Quality Score Code Coverage Total Downloads

This package makes it easy to send Twilio notifications with Laravel 5.5+, 6.x, 7.x, 8.x & 9.x

You are viewing the 3.x documentation. Click here to view the 2.x documentation.

Contents

Installation

You can install the package via composer:

Configuration

Add your Twilio Account SID, Auth Token, and From Number (optional) to your .env:

Advanced configuration

Run php artisan vendor:publish --provider="NotificationChannels\Twilio\TwilioProvider"

Suppressing specific errors or all errors

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 but notification failed events will still be emitted.

Recommended Configuration

Twilio recommends always using a Messaging Service because it gives you access to features like Advanced Opt-Out, Sticky Sender, Scaler, Geomatch, Shortcode Reroute, and Smart Encoding.

Having issues with SMS? Check Twilio's best practices.

Upgrading from 2.x to 3.x

If you're upgrading from version 2.x, you'll need to make sure that your set environment variables match those above in the config section. None of the environment variable names have changed, but if you used different keys in your services.php config then you'll need to update them to match the above, or publish the config file and change the env key.

You should also remove the old entry for twilio from your services.php config, since it's no longer used.

The main breaking change between 2.x and 3.x is that failed notification will now throw an exception unless they are in the list of ignored error codes (publish the config file to edit these).

You can replicate the 2.x behaviour by setting 'ignored_error_codes' => ['*'], which will case all exceptions to be suppressed.

Usage

Now you can use the channel in your via() method inside the notification:

You can also send an MMS:

Or create a Twilio call:

In order to let your Notification know which phone are you sending/calling to, the channel will look for the phone_number attribute of the Notifiable model. If you want to override this behaviour, add the routeNotificationForTwilio method to your Notifiable model.

Available Message methods

TwilioSmsMessage

TwilioCallMessage

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 MIT License (MIT). Please see License File for more information.


All versions of twilio with dependencies

PHP Build Version
Package Version
Requires php Version >=7.2|^8.0
twilio/sdk Version ~6.0|^7.16
illuminate/notifications Version ^7.0 || ^8.0 || ^9.0 || ^10.0|^11.0
illuminate/support Version ^7.0 || ^8.0 || ^9.0 || ^10.0|^11.0
illuminate/events Version ^7.0 || ^8.0 || ^9.0 || ^10.0|^11.0
illuminate/queue Version ^7.0 || ^8.0 || ^9.0 || ^10.0|^11.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package laravel-notification-channels/twilio contains the following files

Loading the files please wait ....