dev-master
9999999-devA Plivo-PHP Wrapper for Laravel
MIT
The Requires
by Meisam Mulla
laravel sms voice plivo
A Plivo-PHP Wrapper for Laravel
This is a simple wrapper around plivo/plivo-php
that creates a Plivo
facade for Laravel., (*1)
Navigate your your laravel installation and type the following into the command line, (*2)
composer require meisam-mulla/laravel-plivo:dev-master
Add the following in your ServiceProvider array in config/app.php, (*3)
MeisamMulla\Plivo\ServiceProvider::class,
Add the following to your aliases array, (*4)
'Plivo' => MeisamMulla\Plivo\Facade::class,
Run php artisan vendor:publish
, (*5)
Add the following lines at the bottom of your .env:, (*6)
PLIVO_AUTH_ID=YOURAUTHID PLIVO_AUTH_TOKEN=YOURAUTHTOKEN
Your Auth ID and Token can be found in your Plivo dashboard., (*7)
Refer to the PHP Helper Docs for all the methods available. Simple example on how to send a SMS:, (*8)
<?php namespace App\Http\Controllers; use Plivo; class PlivoTestController extends Controller { public function sendMessage() { Plivo::send_message([ 'src' => '16045555555', 'dst' => '17785555555', 'text' => 'This is a text message', ]); } }
A Plivo-PHP Wrapper for Laravel
MIT
laravel sms voice plivo