PHP code example of pantera / yii2-sms

1. Go to this page and download the library: Download pantera/yii2-sms 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/ */

    

pantera / yii2-sms example snippets


//...
'components'    => [
//...
    'sms'   =>  [
        'class' => 'pantera\sms\Sms',
        'services'  => [
            // File
            'file'  => [
                'class' => 'pantera\sms\services\File'
            ],
            // smsonline.ru
            'smsonline' =>  [
                'class'     =>  'pantera\sms\services\SmsOnline',
                'login'     => 'your login',
                'password'  => 'your password'   
            ],
            // see more src/services
        ]
    ]
//...
],
//...

//...
Yii::$app->sms->send('phone number', 'Lily Was Here');
//...