aedart/athenaeum-audit
最新稳定版本:9.20.0
Composer 安装命令:
composer require aedart/athenaeum-audit
包简介
Audit trail package for Laravel Eloquent
README 文档
README
An audit trail package for Laravel Eloquent Model. It is able to store the changes made on a given model into an "audit trails" table, along with the attributes that have been changed.
Example
namespace Acme\Models; use Illuminate\Database\Eloquent\Model; use Aedart\Audit\Traits\RecordsChanges; class Category extends Model { use RecordsChanges; }
Later in your application...
$category = Category::create( [ 'name' => 'My category' ]); // Obtain the "changes" made (in this case a "create" event) $changes = $category->recordedChanges()->first(); print_r($changes->toArray()); // Example output: // [ // "id" => 1 // "user_id" => null // "auditable_type" => "Acme\Models\Category" // "auditable_id" => "24" // "type" => "created" // "message" => "Recording created event" // "original_data" => null // "changed_data" => [ // "name" => "My Category" // "id" => 1 // ] // "performed_at" => "2021-04-28T11:07:24.000000Z" // "created_at" => "2021-04-28T11:07:24.000000Z" // ]
Documentation
Please read the official documentation for additional information.
Repository
The mono repository is located at github.com/aedart/athenaeum
Versioning
This package follows Semantic Versioning 2.0.0
License
BSD-3-Clause, Read the LICENSE file included in this package
统计信息
- 总下载量: 2.22k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: BSD-3-Clause
- 更新时间: 2021-04-28