PHP code example of mamadali / yii2-bale-bot

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

    

mamadali / yii2-bale-bot example snippets


    'components' => [
        ...
        'bale' => [
            'class' => 'mamadali\bale\Bale',
            'botToken' => '<Enter your bot token here>',
        ],
        ...
    ];

<?= Yii::$app->bale->sendMessage([
        'chat_id' => '<Enter chat id here>',
        'text' => 'test',
    ]); 

sendMessage
sendPhoto
sendAudio
sendDocument
sendVideo

php composer.phar