Download the PHP package i-rocky/laravel-twilio without Composer

On this page you can find all versions of the php package i-rocky/laravel-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 laravel-twilio

laravel-twilio

Installation

Run the following commands

composer require i-rocky/laravel-twilio

php artisan laravel-twilio:install

This should publish the following files

To use TwilioService.js run yarn add axios twilio-client

You can add/update/remove/move the files and use as your wish

Setup

Update config/services.php

Update .env

Now you have to set the Webhook URL in Twilio console.

Replace laravel-twilio in the Webhook URL with the base URL you've set for LARAVEL_TWILIO_BASE_URL in .env

Incoming Calls

Go to your phone number configuration from Active Numbers then click on the desired number.

  1. Under Voice & Fax for Accept Incoming select Voice Calls
  2. Under Configure With select Webhooks, TwiML Bins, Functions, Studio, or Proxy
  3. Under A Call Comes In select Webhook and set the value to https://your-domain.tld/api/laravel-twilio/voice/incoming

Incoming Faxes

Go to your phone number configuration from Active Numbers then click on the desired number.

  1. Under Voice & Fax for Accept Incoming select Faxes
  2. Under Configure With select Webhooks, TwiML Bins, Functions, Studio, or Proxy
  3. Under A Fax Comes In select Webhook and set the value to https://your-domain.tld/api/laravel-twilio/fax/incoming

Incoming Messages

Go to your phone number configuration from Active Numbers then click on the desired number.

  1. Under Configure With select Webhooks, TwiML Bins, Functions, Studio, or Proxy
  2. Under A Message Comes In select Webhook and set the value to https://your-domain.tld/api/laravel-twilio/message/incoming

Outgoing Calls

Go to TwiML Apps list and select desired app or create a new app

  1. Under Voice set the REQUEST URI to https://your-domain.tld/api/laravel-twilio/voice

Usage

Implement Notifiable

Implement notification

If you don't use the to('+number') method in your message construction, you must have phone, phone_number property or routeNotificationForTwilio() method implemented in your Notifiable implementation. The number must start with + followed by country code.

If you don't have username property definition in your Auth provider model, you must implement laravelTwilioIdentity() method to give your agents an identity for calling.

Events

Namespace Rocky\LaravelTwilio\Events

All the parameters sent by Twilio are available in the instance passed through Event. Some of the frequently used properties are added for autocomplete support.

Example:

The incoming fax implementation is not tested.

Look into the source code for a clearer understanding.


All versions of laravel-twilio with dependencies

PHP Build Version
Package Version
Requires twilio/sdk Version ^5.38
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 i-rocky/laravel-twilio contains the following files

Loading the files please wait ....