huyct/log-helper

Log Helper Package

v2.0.0 2025-02-25 10:36 UTC

This package is auto-updated.

Last update: 2025-05-25 11:06:33 UTC


README

  • This package help us send log to Telegram channel through a bot chat and it runs with Job in Laravel framework.

1. Requirement and install

  • PHP >=7.0
composer require huyct/log-helper
  • Add this line to bootstrap/providers.php in laravel >=11.0 and in config/app.php in lower version.
\Huyct\TelegramHelper\providers\LogHelperProvider::class,
  • Publish config
php artisan vendor:publish --tag=loghelper
# Position of file config: config/loghelper.php
  • Add these lines to .env
TELEGRAM_BOT_TOKEN=
TELEGRAM_CHANNEL_LOG_ID=    
TELEGRAM_CHANNEL_ERROR_ID=
// these lines if you lack
HELPER_LOG_DRIVER=telegram
HELPER_LOG_ENABLE=true
HELPER_LOG_QUEUE_NAME=send-log