2017 © Pedro Peláez
 

library isms

A Laravel 4 SMS Api Package (isms.com.my)

image

itsaafrin/isms

A Laravel 4 SMS Api Package (isms.com.my)

  • Wednesday, September 3, 2014
  • by itsaafrin
  • Repository
  • 3 Watchers
  • 3 Stars
  • 5 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Malaysian SMS Gateway API (Laravel 4 Package)

Introduction br/ This is Laravel 4 Package that can be used to integrate Malaysian SMS gateway to your project. The following package is utilizing the SMS gateway service provided by ISMS (isms.com.my), (*1)

Installation br/ In the require key of composer.json file add the following, (*2)

"itsaafrin/isms": "dev-master"

Next run the composer update command to fetch and update the package into your project, (*3)

composer update

In your config/app.php add 'Itsaafrin\Isms\IsmsServiceProvider' to the end of the $providers array, (*4)

'providers' => array(

    'Illuminate\Foundation\Providers\ArtisanServiceProvider',
    'Illuminate\Auth\AuthServiceProvider',
    ...
    'Itsaafrin\Isms\IsmsServiceProvider',

),

At the end of config/app.php add 'ISMS' => 'Itsaafrin\Isms\IsmsFacade' to the $aliases array, (*5)

'aliases' => array(

    'App'        => 'Illuminate\Support\Facades\App',
    'Artisan'    => 'Illuminate\Support\Facades\Artisan',
    ...
    'ISMS' => 'Itsaafrin\Isms\IsmsFacade',

),

Navigate to vendor/itsaafrin/isms/src/config/config.php and add your username and password of the isms.com.my account, (*6)

'username' => 'your_username',
'password' => 'your_password',

Usage br/ To send sms:, (*7)

ISMS::SendSMS("destination no", "message to be sent", "sms type");
  • The first parameter (destination_no) : The number where the message should be sent.
  • The second parameter (message to be sent) : The content of the message.
  • The third parameter (sms type) : 1 for ASCII and 2 for UNICODE

To check balance:, (*8)

ISMS::CheckBalance();

Both the function above will return http result and http code as an array. For sending message, empty response for http result indicates message sent successfully., (*9)

Example br/ Sending message:, (*10)

public function SendTestMsg(){
$result = ISMS::SendSMS("0123456789", "Hello World", "2");
dd($result);
}

Checking Balance:, (*11)

public function CheckTestBalance(){
$result = ISMS::CheckBalance();
dd($result);
}

Bugs & Errors br/ Raise any bugs or erros here., (*12)

Note: This is just an initial release and more functionality will be added as the time goes. Feel free to raise any feature request or suggestion. More info -- http://www.laravelmy.com/2014/04/05/malaysian-sms-gateway-api-laravel-4-package/, (*13)

The Versions

03/09 2014

dev-master

9999999-dev

A Laravel 4 SMS Api Package (isms.com.my)

  Sources   Download

MIT

The Requires

 

laravel api sms