PHP code example of naughton-and-ross / telstrasms

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

    

naughton-and-ross / telstrasms example snippets

 php
kubacode\telstraSMS\SMSServiceProvider::class,
 php
'SMS' => kubacode\telstraSMS\SMSFacade::class,
 php
$clientKey = 'clientKey';
$clientSecret = 'clientSecret';
$to = '0400000000';
$body = 'SMS Message'
$message = new kubacode\telstraSMS\telstraSMS($clientKey, $clientSecret);
$message->send($to, $body);
 php
// usage inside a laravel route
Route::get('/', function()
{
    $message = SMS::send('0400000000', 'Test SMS');

    return $message->messageId;
});