medicivn/eloquent-logger 问题修复 & 功能扩展

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

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

medicivn/eloquent-logger

最新稳定版本:v1.0.0

Composer 安装命令:

composer require medicivn/eloquent-logger

包简介

README 文档

README

Automatically update the logger when updating a model.

How to use:

  • First, a root node must be initialized in your model's table
  • Add use ActivityLogTrait; to your eloquent model, example:
use Medicivn\EloquentLogger\ActivityLogTrait;

class UserTest extends Model
{
    use HasFactory, ActivityLogTrait;
    
    /**
    * The column need note write the change
    *
    * Default: []
    */
    const LOGGABLE = [
        'name',
    ];
    
    /**
    * The model name to record changes
    *
    * Default: null
    */
    const MODEL_NAME_LOG = ActivityUserTestLog::class;
    

Function

  • writeLog: write logger when changing data

Notes

  • If you are using ActivityLogTrait for MySQL then create a table with the following columns
    • model_id
    • url
    • time
    • creator
    • creator_id
    • action
    • key
    • old_value
    • new_value

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-10-17

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固