Installation
Install the package into a Laravel 13 application or a PHP project that uses the core client directly:
Laravel discovers the service provider and facade automatically through package discovery. Non-Laravel code can instantiate TelegramBotClient::make() directly.
Requirements
Dependency | Constraint |
|---|---|
PHP |
|
Laravel or Illuminate integration components |
|
Guzzle |
|
Laravel Prompts | Required by interactive Laravel console commands |
PSR logger |
|
PHP 8.4 and 8.5 are covered by required CI checks that fail on deprecations. PHP 8.6 development builds are checked without blocking releases until PHP 8.6 is stable.
Version v1.19.1 is the final 1.x release for older host applications. Starting with v2.0.0, the package requires PHP 8.4 or newer and Laravel 13 for Laravel integration.
Publish Configuration
Publish config/telegram-bot.php:
You can also run the interactive installer:
The installer publishes config, can verify the configured bot through Telegram getMe, and prints copy-ready environment values. It does not write secrets into .env.
Manual Provider Registration
If package discovery is disabled in the host application, register the provider manually in bootstrap/providers.php:
Minimal Environment
Never commit real bot tokens, chat IDs, webhook secrets, private keys, or screenshots that contain them.
Verify Installation
Check that the configured token belongs to the expected bot:
After configuring a channel or explicit destination, send a delivery test:
For a direct explicit chat test:
Install In Non-Laravel PHP Code
The package is designed for Laravel, but the core client can be created directly:
Laravel-only features such as config publishing, facade access, package discovery, events, routes, and Artisan commands require a Laravel application.