PHP code example of muxtorov98 / php-telegram-framework

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

    

muxtorov98 / php-telegram-framework example snippets


(new \App\Console\Commands\SetBotCommands())->handle();

app/
 ├── Console/
 │   ├── Commands/
 │   │   ├── MigrateCommand.php
 │   │   ├── SetBotCommands.php
 │   │   └── ResetBotCommands.php
 │   └── ConsoleKernel.php
 ├── Core/
 │   ├── Bot.php
 │   ├── Router.php
 │   ├── Polling.php
 │   ├── FormFlowManager.php
 │   ├── Attributes/
 │   │   ├── Handler.php
 │   │   ├── FormStep.php
 │   │   └── Permission.php
 │   └── Helpers/
 │       ├── SessionHelper.php
 │       └── FileHelper.php
 ├── Handlers/
 │   ├── Users/
 │   │   ├── StartHandler.php
 │   │   ├── RegisterHandler.php
 │   │   └── AuthHandler.php
 │   └── Shop/
 │       ├── ProductViewHandler.php
 │       ├── CartHandler.php
 │       └── OrderHandler.php
 ├── Services/
 │   ├── LoggerService.php
 │   ├── PaginationHelper.php
 │   ├── ProductService.php
 │   ├── OrderService.php
 │   └── CartService.php
 └── Data/
     └── Config.php
bash
docker compose exec telegram-bot php bin/console migrate

/start
/add_product
/products
/cart
/orders
/notify_users
/help

/start
/orders
/products
/help
bash
docker compose exec telegram-bot php bin/console set:commands