PHPackages                             andrewboy/historylog - 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. [Database &amp; ORM](/categories/database)
4. /
5. andrewboy/historylog

ActiveLibrary[Database &amp; ORM](/categories/database)

andrewboy/historylog
====================

Laravel package for Model history logging.

29361PHP

Since Oct 1Pushed 10y ago1 watchersCompare

[ Source](https://github.com/andrewboy/HistoryLog)[ Packagist](https://packagist.org/packages/andrewboy/historylog)[ RSS](/packages/andrewboy-historylog/feed)WikiDiscussions master Synced 1w ago

READMEChangelogDependenciesVersions (1)Used By (0)

HistoryLog
==========

[](#historylog)

This is a Laravel 5 package, that can log Model history.

It's under development, not recommended for production use!

Installation
------------

[](#installation)

add bundle to composer:

```
"andrewboy/historylog": "dev-master"

```

run composer:

```
composer install / update
```

add service provider to the providers list:

```
'Andrewboy\HistoryLog\HistoryLogServiceProvider'

```

publish config and migration:

```
php artisan vendor:publish --provider="Andrewboy\HistoryLog\HistoryLogServiceProvider"
```

run migration:

```
php artisan migrate
```

Usage
-----

[](#usage)

1. You have to create a Trait that uses the "HistoryLog" trait and implement the "getUserId" abstract method.

```
use Andrewboy\HistoryLog\Traits\HistoryLogTrait;

trait MyHistoryLogTrait{

    use HistoryLogTrait;

    /**
     * Get the logged users' ID
     * @return integer | null On success user ID
     */
    public function getUserId()
    {
        ...
    }
}
```

2. Simply just add the trait to your model

```
use App\Traits\MyHistoryLogTrait;

class MyModel extends Model
{

    use MyHistoryLogTrait;

}
```

###  Health Score

23

—

LowBetter than 26% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community5

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/1fffd03f6394ab7501672bb08668811da515facc3e160cfd1d433fbbd53a352c?d=identicon)[andrewboy](/maintainers/andrewboy)

### Embed Badge

![Health badge](/badges/andrewboy-historylog/health.svg)

```
[![Health](https://phpackages.com/badges/andrewboy-historylog/health.svg)](https://phpackages.com/packages/andrewboy-historylog)
```

###  Alternatives

[jdorn/sql-formatter

a PHP SQL highlighting library

3.9k116.5M113](/packages/jdorn-sql-formatter)[propel/propel1

Propel is an open-source Object-Relational Mapping (ORM) for PHP5.

8361.6M87](/packages/propel-propel1)[mpociot/laravel-composite-key

Support composite keys in your laravel app.

3544.8k1](/packages/mpociot-laravel-composite-key)

PHPackages © 2026

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