Skip to content

Latest commit

 

History

History
35 lines (23 loc) · 739 Bytes

README.md

File metadata and controls

35 lines (23 loc) · 739 Bytes

Twilio Wrapper for Laravel

This package is a work in progress. It's not ready to be used in production.

Installation

composer require grosv/laravel-twilio

Usage

Set up your credentials in .env

TWILIO_SID=your_twilio_sid
TWILIO_TOKEN=your_twilio_token
TWILIO_FROM=+1XXXXXXXXXX
TWILIO_SANDBOX_TO=+1XXXXXXXXXX
TWILIO_SANDBOX=true

When TWILIO_SANDBOX is set to true all text messages will go to your TWILIO_SANDBOX_TO phone number. When you are ready to go live, set it to false.

Send a text message:

use Grosv\LaravelTwilio\Twilio;

// sendSMS($message, $to, $from = env('TWILIO_FROM'))
$sent = (new Twilio())->sendSMS('Lorem instagram emoji', '+1XXXXXXXXXX');

more to come...