samueletur/laravel-error-tracking-to-telegram 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

samueletur/laravel-error-tracking-to-telegram

最新稳定版本:v1.0.1

Composer 安装命令:

composer require samueletur/laravel-error-tracking-to-telegram

包简介

This package send an alert notification to telegram when a error from laravel is executed

README 文档

README

Latest Version on Packagist Software License Total Downloads

Installation

You can install the package via composer:

composer require samueletur/laravel-error-tracking-to-telegram

Call LaravelErrorTrackingToTelegram in app\Exceptions\Handler inside register function

    public function register(): void
    {
        $this->reportable(function (Throwable $e) {
            LaravelErrorTrackingToTelegram::send($e);
        });
    }

Configuration

Configuring for use within your Laravel app takes place mainly in the config/error_tracking_telegram.php file. Each item is broken down in the comment lines above it, describing what that item does and what value(s) it's anticipating.

Create and set parameters on .env

TELEGRAM_BOT_TOKEN='XXXXXXXXXX:XXXXXXXxxxXXxxXxXxx-xXxxXXxXXxXXxxx'
TELEGRAM_CHAT_ID=999999999

There are also two .env variables you'll need to set depending on if you use notifications:

  • TELEGRAM_BOT_TOKEN, the token of telegram app
  • TELEGRAM_CHAT_ID, ID from your chat or group room.

Tip: How to create a bot token on Telegram.

  1. Crie uma conta no Telegram
  2. Inicie uma conversa com o @botfather (lembre-se que os robôs oficiais do Telegram têm um tique azul do lado do nome)
  3. Clique em iniciar
  4. Escolha o comando /newbot
  5. Escolha o nome do seu chatbot e faça as configurações gerais

You can publish the config file with:

php artisan vendor:publish --tag=error_tracking_telegram_config

This is the contents of the published config file:

return [
    'telegram_bot_token' => env('TELEGRAM_BOT_TOKEN'),
    'telegram_chat_id' => env('TELEGRAM_CHAT_ID')
];

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Credits

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-10-30

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固