laravel-twilio maintained by grosv
Description
Laravel 6+ wrapper for the Twilio SDK
Author
Last update
2020/09/07 15:40
(dev-master)
License
Downloads
33
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...