PHP code example of mollsoft / web-telegram-bot

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

    

mollsoft / web-telegram-bot example snippets


if( is_file(base_path('routes/telegraph.php')) ) {
    Route::middleware('telegraph')
        ->name('telegraph.')
        ->prefix('telegraph')
        ->group(base_path('routes/telegraph.php'));
}
bash
composer  web-telegram-bot:install

php artisan migrate
app/Providers/RouteServiceProvider.php
$this->routes(function () {
bash
php artisan telegraph:new-bot
bash
php artisan telegraph:polling BOT_ID --debug
bash
php artisan telegraph:live --debug
html
<main>
    <video src="{{ resource_path("media/logo.mp4") }}" />
    <reply-keyboard>
        <row>
            <columm>Menu 1</columm>
            <column>Menu 2</column>
        </row>
        <row>
            <columm>Menu 3</columm>
            <column>Menu 4</column>
        </row>
    </reply-keyboard>
</main>