2017 © Pedro Peláez
 

library laravel4-twilio

A Laravel 4 Package for Twilio

image

cooperative-computing/laravel4-twilio

A Laravel 4 Package for Twilio

  • Sunday, July 20, 2014
  • by cooperative-computing
  • Repository
  • 1 Watchers
  • 0 Stars
  • 3,340 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Twilio Package for Laravel 4

This package is a wrapper created on top of the official Twilio SDK to be used as a Laravel 4 Package., (*1)

Installation

Begin by installing this package through Composer. Edit your project's composer.json file to require cooperative-computing/laravel4-twilio., (*2)

"require": {
    "cooperative-computing/laravel4-twilio": "dev-master"
}

Next, update Composer from the Terminal:, (*3)

composer update

Once composer has finished updating the dependencies, you need to add the Service Provider. Open app/config/app.php, and add a new item to the providers array., (*4)

'CooperativeComputing\Laravel4Twilio\Laravel4TwilioServiceProvider',

Then, add a Facade for more convenient usage. In app/config/app.php add the following line to the aliases array:, (*5)

'Twilio'          => 'CooperativeComputing\Laravel4Twilio\Facades\Laravel4Twilio',

Publish package config files from the Terminal, (*6)

php artisan config:publish cooperative-computing/laravel4-twilio

Edit app/config/packages/cooperative-computing/laravel4-twilio/twilio.php with your appropriate Twilio settings., (*7)

Usage

Sending a SMS Message, (*8)

Twilio::sendMessage(<recipient_number>, <message_body>, [from_number]);

This method will return you an associative array in the response with the following keys:, (*9)

  • status = success/error
  • code = 200 (if success) / Twilio SDK Error Code (if error)
  • message = Message SID (if success) / Error Message (if error)

Example:, (*10)

<?php
    Twilio::sendMessage('+14158141829', 'Hello from Twilio');
?>

License

laravel4-twilio is open-source software licensed under the MIT License, (*11)

The Versions

20/07 2014

dev-master

9999999-dev http://www.cooperativecomputing.com

A Laravel 4 Package for Twilio

  Sources   Download

MIT

The Requires

 

by Avatar cooperative-computing

sms laravel4 twilio call