1. Go to this page and download the library: Download wasiliana/laravel-sdk 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/ */
wasiliana / laravel-sdk example snippets
use Wasiliana\LaravelSdk\Facades\Sms;
$response = Sms::to(['2547XXXXXYYY', '2547XXXXXZZZ']) //use an array for multiple recipients
->message('This cold...Mayoooo!!!') // your message
->send(); // fire request
// OR
$response = Sms::send('2547XXXXXYYY', 'This cold...Mayoooo!!!'); //compose message, add recipients and send
$response = Sms::to('2547XXXXXYYY')
->message('This a test dispatch.')
->service('service_2')
->send();
// OR
$response = Sms::service('service_2')->send(['2547XXXXXYYY', '2547XXXXXZZZ'], 'This a send test using a different service.'); // for multiple recipients use an array
// success response
// a confirmation from Wasiliana that the request has been received.
Array
(
[status] => success
[data] => Successfully Dispatched the sms to process
[message_uid] => conversation_id_20220831154811
)
// error response
Array
(
[status] => error
[message] => Error in the data provided
[data] => Array
(
[0] => The message field is
// success response
Array
(
[status] => success
[message] => Ksh. 10 has been toped up sucessfuly
)
// error response
Array
(
[status] => error
[message] => Error in the data provided
[data] => Array
(
[0] => The phone field is
bash
php artisan wasiliana:install
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.