yemeni-open-source / laravel-telegram-log
Laravel telegram log is a package that can catch your logs all quite simply.
Installs: 285
Dependents: 0
Suggesters: 0
Security: 0
Stars: 6
Watchers: 2
Forks: 1
Open Issues: 0
pkg:composer/yemeni-open-source/laravel-telegram-log
Requires (Dev)
- orchestra/testbench: ^6.24
This package is auto-updated.
Last update: 2025-10-29 02:51:06 UTC
README
Laravel Telegram log
Laravel telegram log is a package that can catch your logs all quite simply.
Requirments
This package is tested with Laravel v8 it my not work on Laravel v7 or v6 or v5
| php | ^7.3|^8.0 |
| Composer | ^2.3 |
| Laravel | ^8.0 |
Installation
Install the package by using composer:
composer require yemeni-open-source/laravel-telegram-log
Configure Your Needs
You can scape this step if you want to use default configuration, but you can publish telegram logs configuration by running:
php artisan vendor:publish --provider="YemeniOpenSource\TelegramLog\TelegramLogServiceProvider" --tag=config
This will merge the config/telegramlog.php config file to your root config directory. You are free to modify it.
Setup
Create Telegram bot
Create new telegram bot as following steps:
- visit @BotFather
- send
/newbotto the @BotFather chat. - replay with the name of your new bot.
- then replay with the username for your bot.
- copy your bot token.
Open New Chat with your created bot
- visit t.me/username_of_your_bot
- send
Hior any text message. - visit https://api.telegram.org/bot<YourBOTToken>/getUpdates
- copy your
idwhich insidechatobject.
Update your .env file
LOG_CHANNEL=telegram TELEGRAM_LOGGER_BOT_TOKEN=<your-bot-api-token> TELEGRAM_LOGGER_CHAT_ID=<your-bot-chat-id>
Add Telegram Log Channel
- Add the
telegramlogging channel to yourconfig/logging.php.
'channels' => [ // ... 'telegram' => [ 'driver' => 'custom', 'via' => YemeniOpenSource\TelegramLog\Services\TelegramService::class, 'level' => 'debug', ], // ... ],
Credits
The MIT License (MIT). Please see MIT license File for more information.