PHP code example of chipslays / litegram

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

    

chipslays / litegram example snippets




$bot = bot($config)->webhook();

$bot->command('start', function () use ($bot) {
    $bot->ask('What is your name?', function () use ($bot) {
        $name = $bot->payload('message.text');
        $bot->reply("👋 Nice to meet you, {$name}!");
    });
});

// or
$bot->command('start', 'BotController@startConversation');

$bot->run();
bash
php lite webhook:set
bash
php lite migration:up