nikhilpatel8000/laradiscordalerts 问题修复 & 功能扩展

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

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

nikhilpatel8000/laradiscordalerts

Composer 安装命令:

composer require nikhilpatel8000/laradiscordalerts

包简介

A Laravel package to send error logs to Discord

README 文档

README

LaraDiscordAlerts is a Laravel package that automatically sends application error logs to a specified Discord channel. This helps developers monitor and debug errors in real-time.

Features

  • Sends Laravel application errors to a Discord channel.
  • Easy to configure with a webhook URL.
  • Supports different log levels.
  • Lightweight and efficient.

Installation

You can install the package via Composer:

composer require nikhilpatel8000/laradiscordalerts

Configuration

Publish Configuration File

After installation, publish the configuration file using:

php artisan vendor:publish --tag=laradiscordalerts-config

This will create a config/laradiscordalerts.php file.

Set Up Discord Webhook

  1. Create a Discord Webhook

    • Go to your Discord ServerServer SettingsIntegrationsWebhooks.
    • Click New Webhook, name it, and copy the Webhook URL.
  2. Update .env File

    Add your webhook URL to your .env file:

    DISCORD_WEBHOOK_URL=https://discord.com/api/webhooks/your-webhook-id
  3. Set Log Channel

    Update the LOG_CHANNEL in your .env file:

    LOG_CHANNEL=discord

Usage

Once configured, any application error logs will be automatically sent to the specified Discord channel.

Testing

You can test the logging by running:

Log::error('This is a test error message');

If configured correctly, this message will appear in your Discord channel.

Uninstallation

To remove the package, run:

composer remove nikhilpatel8000/laradiscordalerts

License

This package is open-source and released under the MIT License.

统计信息

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

GitHub 信息

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

其他信息

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