承接 dennenboom/pinert 相关项目开发

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

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

dennenboom/pinert

最新稳定版本:v1.0.0

Composer 安装命令:

composer require dennenboom/pinert

包简介

When errors arise, Pinert notifies.

README 文档

README

Pinert or Pine Alert is a Laravel package that sends detailed error notifications to Slack when exceptions occur in your Laravel applications. Perfect for multiple project environments where you need to monitor errors across different applications using the same Slack webhook.

Installation

You can install the package via composer:

composer require dennenboom/pinert

Publish Configuration

After installing, publish the configuration file:

php artisan vendor:publish --provider="Dennenboom\Pinert\Providers\PinertServiceProvider" --tag="config"

This will create a config/pinert.php configuration file.

Configuration

Basic Configuration

Add these variables to your .env file:

SLACK_ERROR_WEBHOOK_URL=https://hooks.slack.com/services/YOUR/WEBHOOK/URL
SLACK_ERROR_CHANNEL=
SLACK_ERROR_USERNAME="Error Reporter"
SLACK_ERROR_ICON=:rotating_light:

Advanced Configuration

You can further customize the behavior by setting these environment variables:

SLACK_ERROR_MAX_STACK_TRACE_LINES=5
SLACK_ERROR_MIN_LEVEL=error
SLACK_ERROR_ENVIRONMENTS=production,staging
SLACK_ERROR_RATE_LIMIT=60

Usage

Automatic Error Reporting

Once installed and configured, Pinert will automatically send notifications to Slack whenever a reportable exception occurs in your application.

Manual Error Reporting

You can also report exceptions manually:

use Dennenboom\Pinert\Facades\Pinert;

try {
    // Your code that might throw an exception
} catch (\Throwable $e) {
    // Manually report to Slack
    Pinert::reportToSlack($e, request()->all());
}

License

The MIT License (MIT). Please see License File for more information.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-06-03