PHP code example of idk / yii2-botman

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

    

idk / yii2-botman example snippets


// create an instance
$botman = BotManFactory::create($botmanConfig, new \idk\yii2\botman\Cache());

'components' => [
    // default cache used by your app
    'cache' => [
        'class' => 'yii\caching\DbCache',
    ],
    // specific cache for botman
    'botmanCache' => [
        'class' => 'yii\caching\FileCache',
        'cachePath' => '@runtime/botman',
    ],
]