Package to integrate PHP Telegram Bot library in Laravel 8.x

2.0.0 2021-07-16 01:48 UTC

This package is not auto-updated.

Last update: 2024-04-19 19:08:27 UTC


Build Status Code Coverage Code Quality Latest Stable Version Total Downloads Downloads Month Minimum PHP Version License

This package helps easily integrate PHP Telegram Bot library in Laravel application.

Table of Contents


Install this package a command in your command line:

composer require codev-vn/php-telegram-bot-laravel

Copy the package config and migrations to your project with the publish command:

php artisan vendor:publish --provider="PhpTelegramBot\Laravel\ServiceProvider"

After run migration command

php artisan migrate

In the config you have to specify Telegram API KEY


You can inject PhpTelegramBot\Laravel\PhpTelegramBotContract in anywhere and use bot instance

For example:

namespace App\Http\Controllers;

use PhpTelegramBot\Laravel\PhpTelegramBotContract;

class CustomController extends Controller
    public function handle(PhpTelegramBotContract $telegramBot)
        // Call handle method
        // Or set webhook 
        $hookUrl = 'https://hook.url';
        // Or handle telegram getUpdates request

More details about usage you can see on the PHP Telegram Bot docs:


write more tests


If you like living on the edge, please report any bugs you find on the codev-vn/php-telegram-bot-laravel issues page.


Pull requests are welcome. See for information.


Please see the LICENSE included in this repository for a full copy of the MIT license, which this project is licensed under.