Send sms with Skebby and Yii2.
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)
],
],
//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!'
);
}