New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

meisam-mulla/laravel-plivo

A Plivo-PHP Wrapper for Laravel
7,939 2
Install
composer require meisam-mulla/laravel-plivo:dev-master
PHP:>=5.5.9
License:MIT
Last Updated:Oct 19, 2017
Links: GitHub  ·  Packagist
Maintainer: meisam-mulla

Plivo for Laravel

This is a simple wrapper around plivo/plivo-php that creates a Plivo facade for Laravel.

Installation

Navigate your your laravel installation and type the following into the command line

composer require meisam-mulla/laravel-plivo:dev-master

Add the following in your ServiceProvider array in config/app.php

MeisamMulla\Plivo\ServiceProvider::class,

Add the following to your aliases array

'Plivo' => MeisamMulla\Plivo\Facade::class,

Run php artisan vendor:publish

Add the following lines at the bottom of your .env:

PLIVO_AUTH_ID=YOURAUTHID
PLIVO_AUTH_TOKEN=YOURAUTHTOKEN

Your Auth ID and Token can be found in your Plivo dashboard.

Usage

Refer to the PHP Helper Docs for all the methods available. Simple example on how to send a SMS:

<?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',
        ]);
    }
}

Related Packages

lakshmaji/plivo

Send SMS using Plivo Cloud API

17,121 20
lakshmajim/plivo

Send SMS using Plivo Cloud API

5,710 20
arhinful/laravel-mnotify

Laravel package for MNotify SMS and voice notifications

1,746 5
dev-maurice/africans-talk-gateway

Laravel based package for AfricansTalkGateway API

0 1