承接 idoneo/humano-version-control 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

idoneo/humano-version-control

Composer 安装命令:

composer require idoneo/humano-version-control

包简介

Advanced version control and audit system with restoration capabilities

README 文档

README

Latest Version on Packagist Total Downloads

Advanced version control and audit system with restoration capabilities for Laravel applications. Built on top of spatie/laravel-activitylog.

Features

  • 🔍 Comprehensive Audit Trails: Track all changes across your models
  • 🔄 Data Restoration: Restore complete records or individual fields from any version
  • 👤 User Activity Tracking: View all activities by specific users
  • 📊 Visual Comparisons: Side-by-side comparison of different versions
  • 🛡️ Permission Control: Role-based access to restoration features
  • 📈 Dashboard Analytics: Overview of system activity and statistics
  • 🗂️ Model Filtering: Filter activities by model type, user, date range
  • 💾 Snapshot System: Optional full snapshots for complex restoration scenarios

Installation

Requirements

This package requires the following dependencies:

  • PHP 8.1 or higher
  • Laravel 10.0 or higher
  • spatie/laravel-activitylog ^4.10 - For activity logging
  • spatie/laravel-permission ^5.10|^6.0 - For role and permission management
  • yajra/laravel-datatables-oracle ^10.11 - For DataTables functionality

Install via Composer

You can install the package via composer:

composer require idoneo/humano-version-control

Publish Dependencies

If you haven't already installed the required dependencies, they will be installed automatically. However, you may need to configure them:

# Publish and run activity log migrations
php artisan vendor:publish --provider="Spatie\Activitylog\ActivitylogServiceProvider" --tag="activitylog-migrations"

# Publish and run permission migrations  
php artisan vendor:publish --provider="Spatie\Permission\PermissionServiceProvider"

# Run all migrations
php artisan migrate

Package Setup

Publish and run the package migrations:

php artisan vendor:publish --tag="humano-version-control-migrations"
php artisan migrate

Optionally, publish the config file:

php artisan vendor:publish --tag="humano-version-control-config"

Configuration

The package automatically integrates with spatie/laravel-activitylog. Configure which models should have enhanced version control in the config file:

'activity_log' => [
    'trackable_models' => [
        'App\Models\Contact',
        'App\Models\Project',
        'App\Models\Message',
    ],
    'versions_to_keep' => 50,
    'auto_cleanup' => true,
    'cleanup_after_days' => 90,
],

Usage

Basic Setup

Make sure your models use the LogsActivity trait from spatie/laravel-activitylog:

use Spatie\Activitylog\Traits\LogsActivity;
use Spatie\Activitylog\LogOptions;

class Contact extends Model
{
    use LogsActivity;

    public function getActivitylogOptions(): LogOptions
    {
        return LogOptions::defaults()
            ->logFillable()
            ->logOnlyDirty()
            ->dontSubmitEmptyLogs();
    }
}

Accessing the Interface

  • Dashboard: /version-control - Overview and statistics
  • Audit Trail: /version-control/audit - Complete activity log
  • User Activity: /version-control/users/{id}/activity - Activities by specific user
  • Model History: /version-control/audit/{model}/{id} - History for specific record

Restoration

The package provides several restoration options:

  1. Full Record Restoration: Restore all fields from a specific version
  2. Selective Field Restoration: Choose which fields to restore
  3. Preview Mode: See exactly what will change before restoring

API Endpoints

// Get versions for a specific model instance
GET /version-control/api/{model}/{id}/versions

// Get activities with DataTables support
GET /version-control/api/activities

Commands

# Show module status
php artisan humano-version-control status

# Clean up old versions
php artisan humano-version-control cleanup

# Show restore help
php artisan humano-version-control restore

Permissions

Configure which roles can perform restorations:

'restoration' => [
    'authorized_roles' => [
        'admin',
        'super-admin',
    ],
],

UI Features

  • Responsive DataTables: Sortable, filterable activity tables
  • Advanced Filtering: Filter by model, user, date range
  • Real-time Updates: Optional real-time activity updates
  • Visual Indicators: Clear status indicators for changes
  • Bulk Operations: Select multiple fields for restoration

Testing

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The GNU Affero General Public License (AGPL). Please see License File for more information.

idoneo/humano-version-control 适用场景与选型建议

idoneo/humano-version-control 是一款 基于 Blade 开发的 Composer 扩展包,目前已累计 16 次下载、GitHub Stars 达 0, 最近一次更新时间为 2025 年 09 月 30 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「Audit」 「laravel」 「version-control」 「activity-log」 「restoration」 「idoneo」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 idoneo/humano-version-control 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 idoneo/humano-version-control 我们能提供哪些服务?
定制开发 / 二次开发

基于 idoneo/humano-version-control 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

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

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: Blade

其他信息

  • 授权协议: AGPL-3.0
  • 更新时间: 2025-09-30