bipinkareparambil/slack-bug-reporting

Slack Bug Reporting Laravel 包

1.0.2 2023-07-08 10:55 UTC

This package is auto-updated.

Last update: 2024-09-07 09:08:33 UTC


README

此 Laravel 包允许您将错误报告到 Slack,以便于跟踪和协作。

安装

要安装此包,请按照以下步骤操作:

  1. 使用 Composer 需求此包

    composer require bipinkareparambil/slack-bug-reporting
    
  2. 设置环境变量

    在您的 .env 文件中,添加以下变量并将其值设置为您的 Slack 应用的 webhook URL

    SLACK_BUG_REPORTING_WEBHOOK="https://hooks.slack.com/services/{remaining_url_part}"
    

您现在可以使用 Slack Bug Reporting 包在您的 Laravel 应用程序中了!

用法

要向 Slack 报告错误,您可以使用包提供的 SlackBugReportingService。以下是如何使用它的示例:

use BipinKareparambil\SlackBugReporting\SlackBugReportingService;

// Create an instance of the SlackBugReportingService
$slackBugReporting = new SlackBugReportingService();

// Send a bug report message
$message = "Bug report message...";
$response = $slackBugReporting->send($message);