PHP code example of misaf / laravel-sms-gateway-plivo

1. Go to this page and download the library: Download misaf/laravel-sms-gateway-plivo library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

misaf / laravel-sms-gateway-plivo example snippets


// config/services.php
'plivo' => [
    'auth_id'    => env('SMS_GATEWAY_PLIVO_AUTH_ID'),
    'auth_token' => env('SMS_GATEWAY_PLIVO_AUTH_TOKEN'),
    'base_url' => env('SMS_GATEWAY_PLIVO_BASE_URL'),
],

use Misaf\LaravelSmsGateway\Facade\SmsGateway;

$response = SmsGateway::driver('plivo')->send([
    'src'  => '14151234567',
    'dst'  => '14157654321',
    'text' => 'Hello from Plivo',
]);

$request = SmsGateway::driver('plivo')->request();