snickom/yii2-clickatell

Yii2 extension implements Clickatell SMS sender

Installs: 127

Dependents: 0

Stars: 1

Watchers: 1

Forks: 2

Open Issues: 1

Language: PHP

1.0.0 2014-05-12 06:38 UTC

README

Latest Stable Version Total Downloads Latest Unstable Version License

Yii2 extension implements Clickatell SMS sender

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist snickom/yii2-clickatell "*"

or add

"snickom/yii2-clickatell": "*"

to the require section of your composer.json file.

Usage

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

'components' => array(
    ...
    'sms' => array(
        'class' => 'snickom\clickatell\ClickatellSms',
        'clickatell_username'=>'your clickatell user',
        'clickatell_password'=>'your clickatell password',
        'clickatell_apikey'=>'your clickatell api id',
    ),
    ...
);

Then:

Yii::$app->sms->send([
    'to'=>'+421xxxxxxxxx',
    'message'=>'Hello world!',
]);