sensetivity/sms-fly

There is no license information available for the latest version (1.0.4) of this package.

SMSFly plugin for CakePHP 3.x

Installs: 17

Dependents: 0

Suggesters: 0

Security: 0

Stars: 1

Watchers: 2

Forks: 0

Open Issues: 0

Type:cakephp-plugin

1.0.4 2016-05-18 17:43 UTC

This package is auto-updated.

Last update: 2024-04-24 03:41:59 UTC


README

CakePHP SMSFly Plugin for SMS Fly service

Installation

Step 1: Install plugin

You can install this plugin into your CakePHP application using composer.

The recommended way to install composer packages is:

composer require sensetivity/sms-fly": "^1.0.3"

Step 2: Load plugin

// your config/bootstrap.php file

Plugin::load('SMSFly', ['bootstrap' => false, 'routes' => false]);

Step 3: Usage & Configure

To use this plugin just load it on your controller

// your controller

$this->loadComponent('SMSFly.SMSFly', [
    'username' => 'YOUR_USERNAME',
    'password' => 'YOUR_PASSWORD',
]);

After that you can use plugin. It`s easy,

// your controller


// Send for one:
$this->SMSFly->sendSMS(380930001100, 'Some SMS-body message');

// Send SMS to many:
$this->SMSFly->sendSMSToMany([
        380930001100,
        380970001100
   ], 'Тестовий текст для багатьох номерів'); // Cyrillic also working.

Method Examples

// Send SMS for one user.
$this->SMSFly->sendSMS(380930001100, 'Some SMS-body message');

// Send SMS with same text for many users.
$this->SMSFly->sendSMSToMany([
        380930001100,
        380970001100
   ], 'Тестовий текст для багатьох номерів'); // Cyrillic also working.

// Check balance on your account.
$this->SMSFly->getBalance();

// Check the SMS count that left on your account.
$this->SMSFly->getSMSCount();