承接 slavcodev/laravel-event-recorder 相关项目开发

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

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

slavcodev/laravel-event-recorder

最新稳定版本:0.1.0

Composer 安装命令:

composer require slavcodev/laravel-event-recorder

包简介

Laravel Eloquent event recorder

README 文档

README

phpunit psalm php-cs-fixer Latest Version License License

Event recorder trait useful when an event should be emitted only after model successfully saved.

Installation

Using Composer

composer require slavcodev/laravel-event-recorder

Usage

Just add the trait to any of you Eloquent model, it adds recordEvent($event) method and registers listener to emit all recorded events after save.

class User extends \Illuminate\Database\Eloquent\Model
{
    use \Slavcodev\Laravel\Events\EventRecorder;
    
    public function someModifications()
    {
        $this->recordEvent(new UserChanged());
    }
}

Testing

phpunit

Contributing

Please see CONTRIBUTING and CODE OF CONDUCT for more details.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-03-30