PHP code example of katanyoo / yii2-otp-manager

1. Go to this page and download the library: Download katanyoo/yii2-otp-manager library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

katanyoo / yii2-otp-manager example snippets


php yii migrate/up --migrationPath=@vendor/katanyoo/yii2-otp-manager/migrations

return [
    //....
    'components' => [
        'otpManager' => [
            'class' => 'katanyoo\otpmanager\OTPManager',
            'provider_endpoint' => '<ENDPOINT>',
            'username' => '<USERNAME>',
            'password'=> '<PASSWORD>',
        ]
    ],
];

$result = Yii::$app->otpManager
     ->setMobileNo('08xxxxxxxx')
     ->send();

php composer.phar