PHP code example of walkboy / yii2-sms

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

    

walkboy / yii2-sms example snippets


'components' => [
    'sms' => [
        'class' => 'namespace\to\ExtendedSms',  // Class that extends BaseSms
        'viewPath' => '@common/sms',            // Optional: defaults to '@app/sms'

        // send all sms to a file by default.
        'useFileTransport' => true,             // false for real sending

        'messageConfig' => [
            'from' => '+15552221234',           // From number to send from
        ],

        'apiKey' => 'xxxxxxxxxxxxxxx',          // Example where to put keys
    ]
]

Hello <?= $name