d2my/incidents

Laravel 事件包

1.0.0 2023-03-18 16:21 UTC

This package is auto-updated.

Last update: 2024-09-18 20:12:36 UTC


README

在 providers 数组中为包提供者添加

  D2my\Incidents\Providers\IncidentsServiceProvider::class,

发布配置

  php artisan vendor:publish --tag=incidents

config/incidents.php

在 channels 数组中为每个通道分配一个 handler,该 handler 必须实现 D2my\Incidents\Contracts\IncidentHandler 接口

  'blocker' => [
      'handler' => \App\Services\Handler::class
  ],

启动

  D2my\Incidents\Facades\Incident::send('channel', 'message');