be-park/eventer 问题修复 & 功能扩展

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

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

be-park/eventer

最新稳定版本:v4.1

Composer 安装命令:

composer require be-park/eventer

包简介

Improve laravel listener and register event in database making them restorable

README 文档

README

  • This package improve the way laravel manage his listener to be able to listen on parent class of the event
  • This package allow storing the event in the database in order to make them restorable

Installation

Add an Extends from Bepark\Eventer\EventServiceProvider to the event provider class App\Provider\EventServiceProvider

With just this installation the event will be saved in your database.

You can also publish the config file php artisan vendor:publish --provider="Bepark\Eventer\AppServiceProvider". You'll be able to set listen_on_eloquent to also store all eloquent event generated by Laravel

Listen on parent class

You can listen on the parent class of the triggered event by using the EventHelper. Check the StorableEventListener to see how it works.

listenWithChildren() will start listening on all event and will call the listener when it match.

Call it in the subscribe() method of your listener

EventHelper::listenWithChildren(Dispatcher $event, <ParentClass>, 'ListenerClass@method'); 

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-01-04