Download the PHP package minkhantnaung/laravel-telegram-topic-logger without Composer
On this page you can find all versions of the php package minkhantnaung/laravel-telegram-topic-logger. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package laravel-telegram-topic-logger
Laravel Telegram Topic Logger
A Laravel custom logging channel that sends application logs to Telegram groups or channels, with full support for Telegram topic threads (message_thread_id) using Monolog v3.
Note: This package supports public and private Telegram groups, supergroups, and channels.
Why use this package?
- ✅ Supports Telegram topic threads (
message_thread_id) - ✅ Works with Monolog v3 and Laravel 11, 12, and 13
- ✅ Simple custom channel configuration
- ✅ No third-party Telegram SDK required
Requirements
- PHP >= 8.2 (PHP >= 8.3 is required when using Laravel 13)
- Laravel 11, 12, or 13
- Monolog >= 3.0
Installation
You can install the package via Composer:
Configuration
1. Publish the configuration file (optional)
2. Configure your logging channel
Add a custom channel to your config/logging.php file:
3. Environment Variables
Add the following to your .env file:
Usage
Once configured, you can use the logging channel in your application:
Or add it to your stack:
Example: Sending Error Reports
Getting Your Telegram Bot Token
- Open Telegram and search for @BotFather
- Send
/newbotand follow the instructions - Copy the bot token provided
Getting Your Chat ID
This package works with both public and private Telegram groups and channels.
- Add your bot to a group or channel (public or private)
- Send a message to the group/channel
- Visit
https://api.telegram.org/bot<YOUR_BOT_TOKEN>/getUpdates - Find the
chat.idvalue in the response
Getting Your Thread ID (for Topics)
⚠️ Telegram topics are available only in supergroups.
Ifthread_idis not provided, messages will be sent to the General topic.
- Enable topics in your Telegram group
- Create a topic or use an existing one
- Send a message to the topic
- Visit
https://api.telegram.org/bot<YOUR_BOT_TOKEN>/getUpdates - Find the
message_thread_idvalue in the response
Support the project
If this package helps you, please consider giving it a ⭐ on GitHub. It helps others discover the project and motivates further development.
License
The MIT License (MIT). Please see License File for more information.