PHPackages                             cooperative-computing/laravel4-twilio - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. cooperative-computing/laravel4-twilio

AbandonedLibrary

cooperative-computing/laravel4-twilio
=====================================

A Laravel 4 Package for Twilio

13.4kPHP

Since Jul 19Pushed 11y agoCompare

[ Source](https://github.com/cooperative-computing/laravel4-twilio)[ Packagist](https://packagist.org/packages/cooperative-computing/laravel4-twilio)[ RSS](/packages/cooperative-computing-laravel4-twilio/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependenciesVersions (1)Used By (0)

Twilio Package for Laravel 4
============================

[](#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.

Installation
------------

[](#installation)

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

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

```

Next, update Composer from the Terminal:

```
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.

```
'CooperativeComputing\Laravel4Twilio\Laravel4TwilioServiceProvider',

```

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

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

```

Publish package config files from the Terminal

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

```

Edit `app/config/packages/cooperative-computing/laravel4-twilio/twilio.php` with your appropriate Twilio settings.

Usage
-----

[](#usage)

Sending a SMS Message

```
Twilio::sendMessage(, , [from_number]);

```

This method will return you an associative array in the response with the following keys:

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

Example:

```
