Skip to content

emnabs/yii2-smser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Yii2 Smser Component

Smser is a component based sms solution for Yii2.It is released under the BSD 3-Clause license.

Latest Stable Version Total Downloads License

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist emnabs/yii2-smser "*"

or add

"emnabs/yii2-smser": "*"

to the require section of your composer.json.

Usage

To use this extension, you have to configure the Connection class in your application configuration:

//configure component:
return [
    //....
    'components' => [
	//....
        'smser' => [
            'class' => 'emhome\smser\Smser',
        ],
	//....
    ]
];

Usage example

Yii::$app->smser->compose()
	->setMobile(['手机号码'])
        ->setContent('短信内容')
        ->send();

包含接口

License

yii2-smser is released under the BSD 3-Clause License. See the bundled LICENSE.md for details.