承接 sergeich5/laravel-telegram-logs 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

sergeich5/laravel-telegram-logs

最新稳定版本:v2.1.1

Composer 安装命令:

composer require sergeich5/laravel-telegram-logs

包简介

Telegram log channel

README 文档

README

  1. Run composer
composer require sergeich5/laravel-telegram-logs
  1. Add new channel to your config/logging.php at channels stack
'telegram' => [
    'driver' => 'custom',
    'via'    => \Sergeich5\LaravelTelegramLogs\TelegramLogger::class,
    'level' => 'debug',
    
    // Telegram BOT_ID and TOKEN colon separated
    'token' => 'BOT_ID:BOT_TOKEN',
    
    // Telegram Chat Id
    'chat_id' => '12345678',
    
    // int|null to send message to specific chat thread, see: https://core.telegram.org/api/threads
    'thread_id' => '123',
    
    // int|optional - telegram request timeout
    'timeout' => 25,
    
    // string|optional telegram api domain
    'domain' => 'https://api.telegram.org/',
],

Get Telegram updates

php artisan tg_logs:updates {channel_name}

Result:

date chat chat_id from from_id message_id thread_id data
2024-07-17 10:32:38 CHAT_NAME1 -12345678 UserName 12345 1 - Hello, world
2024-07-17 11:26:04 CHAT_NAME2 -87654321 UserName 12345 2 5 topic TOPIC_NAME created with id 5

统计信息

  • 总下载量: 5.66k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-01-17