Skip to content

benedmunds/Laravel-Twilio

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

#Twilio bundle for Laravel

##Setup Install the bundle

$ php artisan bundle:install twilio

Include it in application/bundles.php

return array('twilio');

##Usage In application/routes.php you can add a simple route to send a text message with

Route::get('/, home', function()
{
	Bundle::start('twilio');
	
	//twilio account settings
	$account_sid = 'ABC123456789';
	$auth_token  = '123456789';

	$client = new Services_Twilio($account_sid, $auth_token);
	$message = $client->account->sms_messages->create(
		'1112223456', // From a valid Twilio number
		'7062894115', // Text this number
		"Ben Edmunds is Awesome!" //Text body
	);

	echo $message->sid;
});

See the Twilio documentation for API details.

Bundle created by Ben Edmunds.

About

Twilio Bundle for Laravel

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages