katanyoo / yii2-otp-manager
This extension for send OTP via SMS to all number in Thailand
Package info
github.com/katanyoo/yii2-otp-manager
Type:yii2-extension
pkg:composer/katanyoo/yii2-otp-manager
v1.2
2017-05-08 21:33 UTC
Requires
This package is not auto-updated.
Last update: 2026-03-01 10:07:42 UTC
README
This extension for send OTP via SMS to all number in Thailand
Installation
The preferred way to install this extension is through composer.
Either run
php composer.phar require --prefer-dist katanyoo/yii2-otp-manager "*"
or add
"katanyoo/yii2-otp-manager": "*"
to the require section of your composer.json file.
You need to run
php yii migrate/up --migrationPath=@vendor/katanyoo/yii2-otp-manager/migrations
Usage
To use this extension, simply add the following code in your application configuration:
return [ //.... 'components' => [ 'otpManager' => [ 'class' => 'katanyoo\otpmanager\OTPManager', 'provider_endpoint' => '<ENDPOINT>', 'username' => '<USERNAME>', 'password'=> '<PASSWORD>', ] ], ];
You can then send an sms as follows:
$result = Yii::$app->otpManager ->setMobileNo('08xxxxxxxx') ->send();