Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Laravel Alarm Laravel Package

aping/laravel-alarm

Laravel package for sending alarms/notifications from exceptions, logs, or custom events. Includes DingTalk robot handler with signature support, configurable event-to-alarm mapping, localization, and queued delivery via laravel-alarm queue. Mail, rate limit, and tests are planned.

View on GitHub
Deep Wiki
Context7

Laravel Alarm

Architecture

laravel alarm for exception or anything(异常报警或自定义报警通知)

Todo

  • DingTalk Robot(钉钉机器人通知)
  • Mail(邮件通知)
  • Rate Limit(限频)
  • Locale(多语言)
  • Tests

Install

composer

php composer.phar require aping/laravel-alarm

或

"require": {
    "aping/laravel-alarm": "dev-master"
}

Config

Laravel 5.5+:

Add Service Provider to config/app.php in providers section

Aping\LaravelAlarm\AlarmServiceProvider::class,

Publish config

php artisan vendor:publish --provider="Aping\LaravelAlarm\AlarmServiceProvider"

Start the queue:

php artisan queue:work --queue=laravel-alarm

Finished

Custom Event Alarm

In config/alarm.php

'events' => [
    //system log(日志事件)
    Illuminate\Log\Events\MessageLogged::class => [
        Aping\LaravelAlarm\Alarms\Handlers\DingTalk\MessageLoggedAlarm::class,
    ],
    //custom event(自定义事件)
    event::class => [
        //alarm,must be implemented "Aping\LaravelAlarm\Alarms\Alarm"
        //报警器,必须实现接口Aping\LaravelAlarm\Alarms\Alarm
        Alarms::class,
    ],
],

The implemented(已实现的报警接口)

  • Aping\LaravelAlarm\Alarms\DingTalkAlarm

Tips

DingTalk security mode suggests using signatures.

钉钉机器人安全模式建议用签名(最好不要用关键字)

Screenshot

Screenshot

Last

alarm anything,implemented interface "Aping\LaravelAlarm\Alarms\Alarm"

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
skyraptor/chatter
edlugz/sasapay
abbasudo/artisan-route
mirvan/ippanel
ignibyte/aic-framework
glavweb/data-schema-bundle
glavweb/datagrid-bundle
tacticmedia/scim-server
uni-method/frame
neika-ai/sdk
adachsoft/php-code-style
pharaonic/laravel-notification-dependencies
beautinow/translug
dev-brainiac/bot-cloaked
octoberrain/html
octoberrain/extension
octoberrain/exception
octoberrain/contracts
adachsoft/api-version-bundle
cgv/localized-resource