PHPackages                             alzpk/laravel-change-log - 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. alzpk/laravel-change-log

ActiveLibrary

alzpk/laravel-change-log
========================

Package that makes it easy to log any changes for your models.

v0.1.0(1y ago)04MITPHPPHP ^8.1

Since Oct 24Pushed 1y ago1 watchersCompare

[ Source](https://github.com/alzpk/laravel-change-log)[ Packagist](https://packagist.org/packages/alzpk/laravel-change-log)[ RSS](/packages/alzpk-laravel-change-log/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (2)Used By (0)

Laravel Change Log
==================

[](#laravel-change-log)

Package that makes it easy to log any changes for your models. The package uses Laravel's [Model Events](https://laravel.com/docs/eloquent) to log the changes. It will log the changes to the `changes` relation of the model, when ever a model is created, updated, or deleted.

The package will allow you to revert the latest changes, or revert changes by id, depending on the action.

Setup
-----

[](#setup)

1. Start of by installing the package:

```
composer require alzpk/laravel-change-log
```

2. Publish the package service provider

```
php artisan vendor:publish --provider="Alzpk\LaravelChangeLog\ChangeLogServiceProvider"
```

3. Run the migrations

```
php artisan migrate
```

Usage
-----

[](#usage)

To use the package, add the trait to the models you want to log:

```
use Alzpk\LaravelChangeLog\Models\Traits\HasChangeLog;
```

Examples
--------

[](#examples)

Here are some examples of how to use the package.

### Use the package

[](#use-the-package)

Bellow is an example of how to use the package inside your model.

```
namespace App\Models;

use Alzpk\LaravelChangeLog\Models\Traits\HasChangeLog;
use Illuminate\Database\Eloquent\Model;

class Product extends Model
{
    use HasChangeLog;
}
```

### Show changes for a model

[](#show-changes-for-a-model)

Bellow is an example of how to use the show changes method.

```
$product = Product::first();

$product->changes->each(function ($change) {
    dump($change);
});
```

### Revert latest changes

[](#revert-latest-changes)

Bellow is an example of how to use the revert latest changes method.

```
$product = Product::first();

$product->revertLatestChanges();
```

### Revert changes by id

[](#revert-changes-by-id)

Bellow is an example of how to use the revert changes by id method.

```
$product = Product::first();

$change = $product->changes->first();

$product->revertChangesById($change->id);
```

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance37

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity37

Early-stage or recently created project

 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

Unknown

Total

1

Last Release

565d ago

### Community

Maintainers

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

---

Top Contributors

[![alzpk](https://avatars.githubusercontent.com/u/25452420?v=4)](https://github.com/alzpk "alzpk (4 commits)")

### Embed Badge

![Health badge](/badges/alzpk-laravel-change-log/health.svg)

```
[![Health](https://phpackages.com/badges/alzpk-laravel-change-log/health.svg)](https://phpackages.com/packages/alzpk-laravel-change-log)
```

PHPackages © 2026

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