PHP code example of kreateyou / vumasms

1. Go to this page and download the library: Download kreateyou/vumasms 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/ */

    

kreateyou / vumasms example snippets




$client = new  \Vumasms\VumaSMS(API_KEY, API_SECRET);     

$messageBag = [
    'to' => [2547XXXXXX],
    'sender' => VUMA,
    'message' => 'Test message from the vumaSMS PHP Client'
];
$message = $client->send($messageBag);

{"success":true,"details":{"type":"outbox","status":"queued","payload":{"to":["2547XXXXXX"],"message":"Your verification code for PROJECT is 3434  \n","sender":"VUMA","scheduled_date":null,"scheduled_type":null},"created_by":"17","scheduled_at":null,"updated_at":"2018-04-18 10:14:22","created_at":"2018-04-18 10:14:22","sid":"36"}};

    Vumasms\Laravel\Providers\ServiceProvider::class,

    app("vumasms")->send($messageBag),
bash
  php artisan vendor:publish --provider "Vumasms\Laravel\Providers\ServiceProvider"