PHPackages                             idoneo/humano-version-control - 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. idoneo/humano-version-control

ActiveLibrary

idoneo/humano-version-control
=============================

Advanced version control and audit system with restoration capabilities

v1.4.2(7mo ago)015AGPL-3.0BladePHP ^8.1

Since Sep 30Pushed 7mo agoCompare

[ Source](https://github.com/diego-mascarenhas/humano-version-control)[ Packagist](https://packagist.org/packages/idoneo/humano-version-control)[ Docs](https://github.com/diego-mascarenhas/humano-version-control)[ RSS](/packages/idoneo-humano-version-control/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (18)Versions (8)Used By (0)

Humano Version Control
======================

[](#humano-version-control)

[![Latest Version on Packagist](https://camo.githubusercontent.com/9cb1e66c530be00927511bf40b0d4ba41458087a7987130a5e709f010ab74b20/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f69646f6e656f2f68756d616e6f2d76657273696f6e2d636f6e74726f6c2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/idoneo/humano-version-control)[![Total Downloads](https://camo.githubusercontent.com/a48bf76647cf9e0ba953d97ab5b1224079b91c758bf3b67a0f600ad0d1fadd48/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f69646f6e656f2f68756d616e6f2d76657273696f6e2d636f6e74726f6c2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/idoneo/humano-version-control)

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

Features
--------

[](#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
------------

[](#installation)

### Requirements

[](#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

[](#install-via-composer)

You can install the package via composer:

```
composer require idoneo/humano-version-control
```

### Publish Dependencies

[](#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

[](#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
-------------

[](#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
-----

[](#usage)

### Basic Setup

[](#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

[](#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

[](#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

[](#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

[](#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
-----------

[](#permissions)

Configure which roles can perform restorations:

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

UI Features
-----------

[](#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
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Diego Adrián Mascarenhas Goytía](https://github.com/diego-mascarenhas)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance63

Regular maintenance activity

Popularity6

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

7

Last Release

227d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/fa190334db1e228625e2df973f74328681cde2469306e3f6f7e519375e04a600?d=identicon)[idoneo](/maintainers/idoneo)

---

Top Contributors

[![diego-mascarenhas](https://avatars.githubusercontent.com/u/1038571?v=4)](https://github.com/diego-mascarenhas "diego-mascarenhas (34 commits)")

---

Tags

laravelAuditactivity-logversion controlidoneorestorationhumano-version-control

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/idoneo-humano-version-control/health.svg)

```
[![Health](https://phpackages.com/badges/idoneo-humano-version-control/health.svg)](https://phpackages.com/packages/idoneo-humano-version-control)
```

###  Alternatives

[bezhansalleh/filament-shield

Filament support for `spatie/laravel-permission`.

2.8k2.9M88](/packages/bezhansalleh-filament-shield)[clickbar/laravel-magellan

This package provides functionality for working with the postgis extension in Laravel.

423715.4k1](/packages/clickbar-laravel-magellan)[spatie/laravel-prometheus

Export Laravel metrics to Prometheus

2651.3M6](/packages/spatie-laravel-prometheus)[muhammadsadeeq/laravel-activitylog-ui

A beautiful, modern UI for Spatie's Activity Log with advanced filtering, analytics, and real-time features.

17510.1k](/packages/muhammadsadeeq-laravel-activitylog-ui)[vormkracht10/laravel-mails

Laravel Mails can collect everything you might want to track about the mails that has been sent by your Laravel app.

24149.7k](/packages/vormkracht10-laravel-mails)[harris21/laravel-fuse

Circuit breaker for Laravel queue jobs. Protect your workers from cascading failures.

3786.5k](/packages/harris21-laravel-fuse)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
