boralp/laravel-auditable
最新稳定版本:1.2.0
Composer 安装命令:
composer require boralp/laravel-auditable
包简介
A lightweight Laravel package to track model changes with IP (binary), deduplicated user agents, and created_by/updated_by auto-fill. Includes export, cleanup, and API endpoints for easy audit history access.
README 文档
README
Laravel Auditable is a lightweight, flexible package for tracking changes to your Eloquent models. It automatically logs create and update actions, including:
- Binary IP storage for fast lookups (IPv4 & IPv6)
- Deduplicated User-Agent table to save space
- Automatic
created_by/updated_bypopulation - Audit logs export to JSON or CSV
- Retention-based cleanup of old logs
- API endpoint to fetch model audit history
It’s designed to be easy to install, reusable across projects, and highly configurable via a simple config file.
Features
- Track who changed a model and when
- Store IP and User-Agent efficiently
- Keep your tables clean (no extra columns per model required)
- Export and archive old logs automatically
- Optional API endpoint for retrieving audit history
- Configurable retention period (
retention_days)
Installation
composer require boralp/laravel-auditable
php artisan vendor:publish --provider="Boralp\Auditable\AuditableServiceProvider" --tag=config
php artisan migrate
统计信息
- 总下载量: 15
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-08-29