定制 coloredcow/laravel-audit 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

coloredcow/laravel-audit

Composer 安装命令:

composer require coloredcow/laravel-audit

包简介

Audit logging for Laravel

README 文档

README

A package to capture system activity in a Laravel application. Currently supports the following fields:

  • IP of HTTP request,
  • HTTP referer,
  • a description of the action you want to audit.
  • user id
  • Other details like data and keys

Installation

  1. Run composer require coloredcow/laravel-audit
  2. Add the ColoredCow\LaravelAudit\AuditServiceProvider to config/app.php
'providers' => [
    ColoredCow\LaravelAudit\AuditServiceProvider::class
];
  1. Run php artisan migrate

Usage

  1. Use the ColoredCow\LaravelAudit\Events\Auditable trait in the events you want to audit. And add this to the contructor of the event.
$this->setAudit([
    'ip' => 'ip-of-user-here',
    'referer' => 'referer-address',
    'action' => 'description of event and action being audited'
]);
  1. Use the ColoredCow\LaravelAudit\Listeners\AuditActivities listener to listen to the events to want to audit. Map it in the EventServiceProvider of your laravel application.

Audit Facade

  1. Add AuditFacade in your app to make a audit directly from the applications.
 AuditFacade::make(['action' => 'Audit Action']);
  1. You can also overide other properties like ip, userid and descriptions.
 AuditFacade::make(['action' => 'Audit Action', 'ip' => 'My IP']);

统计信息

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

GitHub 信息

  • Stars: 4
  • Watchers: 3
  • Forks: 4
  • 开发语言: PHP

其他信息

  • 授权协议: GPL-3.0
  • 更新时间: 2017-09-01

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固