PHPackages                             git-liu/model-records - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. git-liu/model-records

ActiveLibrary[Database &amp; ORM](/categories/database)

git-liu/model-records
=====================

php table model records

4423PHP

Since Dec 17Pushed 5y ago1 watchersCompare

[ Source](https://github.com/git-liu/model-records)[ Packagist](https://packagist.org/packages/git-liu/model-records)[ RSS](/packages/git-liu-model-records/feed)WikiDiscussions master Synced 5d ago

READMEChangelogDependenciesVersions (1)Used By (0)

###### 用途

[](#用途)

针对表数据越来越多，表数据变更也越发麻烦。 写下了这个基于laravel的表数据变更记录模块。用于记录表字段变更过程（包含自定义数据，数据挂载，操作记录等功能）。

###### composer安装

[](#composer安装)

composer require git-liu/model-records

###### 创建变更记录表

[](#创建变更记录表)

```
php artisan migrate
执行完成后会创建 tb_logs，tb_log_contents 两张表用于保存数据
```

###### 发布配置文件

[](#发布配置文件)

```
php artisan vendor:publish --provider=ModifyRecord\ModifyRecordServiceProvider
```

###### 创建模型映射

[](#创建模型映射)

```
php artisan make:mapping UserMapping
映射类文件默认会创建到 app\\Mappings 目录
```

###### 模型映射配置

[](#模型映射配置)

```
