netesy/yii2-bulksms

A simple class to handle the bulk sms api for Nigerian bulk sms hhtp api connection

Installs: 17

Dependents: 0

Suggesters: 0

Security: 0

Stars: 1

Watchers: 2

Forks: 0

Open Issues: 0

Type:yii2-extension

v1.1 2018-06-20 11:51 UTC

This package is auto-updated.

Last update: 2024-12-10 23:47:03 UTC


README

Latest Stable Version Total Downloads License Netesy Netesy Yii2

A Yii2 extension to handle sending messages for most Nigerian bulksms http api connections

A Yii2 extension to handle sending messages for most Nigerian bulksms http api connections

Installation

The preferred way to install this extension is through composer.

Either run

php composer require netesy/yii2-bulksms

or add

"netesy/yii2-bulksms": "*"

to the require section of your composer.json file.

Supported websites

NigerianBulkSMS

BetaSMS

Usage

Once the extension is installed, simply use it in your code by :

first add to config.php

<?php
'components' => [
	'bulksms' => [
          'class' => 'netesy\bulksms\BulkSms',
          'username' => 'xxxxxxxx',
          'password' => 'xxxxxxxx',
          'sender' => 'sender number',
          'url' => 'the api address',
          ],
]
?>

Once the extension is installed, simply use it in your code by : to send a message

<?php 
	Yii::$app->bulksms->sendMessage([
    'number' => $number,
    'message' => 'message',
      ]);
 ?>

to send a call

<?php 
	Yii::$app->bulksms->sendCall([
    'number' => $number,
    'message' => 'message',
      ]);
 ?>

to get your account balance

<?php 
	Yii::$app->bulksms->getBalance();
 ?>