sarahman/laravel-activitylog-with-pivots 问题修复 & 功能扩展

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

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

sarahman/laravel-activitylog-with-pivots

Composer 安装命令:

composer require sarahman/laravel-activitylog-with-pivots

包简介

Activity Log package deals with all kinds of Eloquent events based logging as well as pivot models events.

README 文档

README

This package highly depends on the spatie/laravel-activitylog and fico7489/laravel-pivot composer packages. This package deals with all kinds of Eloquent events based logging as well as the Pivot models events.

Installation

  1. Install package with composer:
composer require sarahman/laravel-activitylog-with-pivots

With this statement, the highest available package version for your current laravel/lumen version will be installed.

  1. Follow the documentation of the spatie/laravel-activitylog to install with skipping the composer package installation command.

  2. Use Sarahman\Database\Support\Traits\LogsActivityWithPivots trait in your base model or only in particular models.

use Sarahman\Database\Support\Traits\LogsActivityWithPivots;
use Illuminate\Database\Eloquent\Model;

abstract class BaseModel extends Model
{
    use LogsActivityWithPivots;
    ...
    ...
}

and that's it; enjoy!

New Eloquent Events

You can check all the Eloquent events here: (https://laravel.com/docs/master/eloquent#events)

The following Pivot based events functionality is customized:

pivotAttached, pivotDetached, pivotUpdated

The activity log is also stored while these pivot events will be occurred. You may check the other Pivot events here.

Licence

MIT

Support

If you are having general issues with this package, feel free to contact me through Gmail.

If you believe you have found an issue, please report it using the GitHub issue tracker, or better yet, fork the repository and submit a pull request.

If you're using this package, I'd love to hear your thoughts. Thanks!

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-01-18