Skip to content

Latest commit

 

History

History
66 lines (51 loc) · 1.6 KB

README.md

File metadata and controls

66 lines (51 loc) · 1.6 KB

Yii2 Skebby SMS Extension


Send sms with Skebby and Yii2.

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist paskuale75/yii2skebby "*"

or add

"paskuale75/yii2skebby": "*"

to the require section of your composer.json.

Component Setup

To use the Setting Component, you need to configure the components array in your application configuration:

'components' => [
    'skebbysms' => [
                'class'     => \paskuale75\yii2skebby\src\components\Skebbysms::class,
                'username'  =>'MyUsername',
                'password'  =>'MyPassword'
                'prefix'    =>'' //if leave empty it get (+39) (Italian code)
    ],
],

Usage:

//Create an action in your controller...

public function actionTestSkebby(){
        // User status details
        Yii::$app->skebbysms->getUserStatus(true, false);
}

//then for send a sms
public function actionTestSkebby(){
        Yii::$app->skebbysms->send(
            ['+3933445566', '+391234567'],
            'Hi, this is a test!'
        );
}