PHPackages                             polashmahmud/history - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. polashmahmud/history

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

polashmahmud/history
====================

A simple laravel history package

v0.0.5(2y ago)41.2k↓93.3%1MITPHPPHP ^7.2.5|^8.0

Since Dec 10Pushed 2y ago2 watchersCompare

[ Source](https://github.com/polashmahmud/history-tracking)[ Packagist](https://packagist.org/packages/polashmahmud/history)[ RSS](/packages/polashmahmud-history/feed)WikiDiscussions main Synced yesterday

READMEChangelog (5)Dependencies (1)Versions (6)Used By (0)

History Tracking System - Laravel Package
=========================================

[](#history-tracking-system---laravel-package)

History Tracking System is a Laravel package that provides history tracking functionality for your Eloquent models. Easily add and manage history for your models with this simple and flexible package.

Features
--------

[](#features)

- **History Tracking**: Associate history with your Eloquent models.
- **History Tracking Trait**: Easily make your models history trackable using the HistoryTracking trait.

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

[](#installation)

To install History Tracking System, simply run:

```
composer require polashmahmud/history
```

Laravel uses Package Auto-Discovery, so doesn't require you to manually add the ServiceProvider. If you don't use auto-discovery, add the ServiceProvider to the providers array in config/app.php

```
Polashmahmud\History\HistoryTrackingServiceProvider::class,
```

Then, migrate your database:

```
php artisan migrate
```

Usage
-----

[](#usage)

### History Tracking Models

[](#history-tracking-models)

To make a model history trackable, use the `Polashmahmud\History\Historyable` trait on the model:

```
use Polashmahmud\History\Historyable;

class Post extends Model
{
    use Historyable;
}
```

that's it! Now your model is history trackable. When a model is updated, a history record will be created for it. The history record will contain the model's previous and new values. The history record will also contain the user who made the change. If the user is not logged in, the history record will contain the user's IP address.

### Retrieving History

[](#retrieving-history)

To retrieve the history of a model, use the `history` method:

```
$post = Post::find(1);

$history = $post->history;
```

The `history` method will return a collection of history records. Each history record will contain the model's previous and new values, the user who made the change, and the date and time the change was made.

Query with `changedBy` method to get the history records that were made by a specific user:

```
$history = $post->history()->with('changedBy')->get();
```

### History Tracking Ignore Columns

[](#history-tracking-ignore-columns)

By default, `updated_at`, `password`, `remember_token` and `email_verified_at` columns are ignored from history tracking. If you want to ignore more columns, you can use `ignoreHistoryColumns` function in your model.

```
use Polashmahmud\History\Historyable;

class Post extends Model
{
    use Historyable;

    public function ignoreHistoryColumns()
    {
        return [
            // 'column_name',
        ];
    }
}
```

### History Tracking Scopes

[](#history-tracking-scopes)

History Tracking System provides some useful scopes to help you retrieve history records.

`Coming soon...`

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

[](#contributing)

Thank you for considering contributing to History Tracking ! Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

License
-------

[](#license)

History Tracking is open-sourced software licensed under the [MIT license](LICENSE.md).

###  Health Score

24

—

LowBetter than 31% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity41

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

5

Last Release

937d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/8996190?v=4)[Polash Mahmud](/maintainers/polashmahmud)[@polashmahmud](https://github.com/polashmahmud)

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/polashmahmud-history/health.svg)

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

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M346](/packages/psalm-plugin-laravel)[renatomarinho/laravel-page-speed

Laravel Page Speed

2.5k1.7M10](/packages/renatomarinho-laravel-page-speed)[illuminate/pagination

The Illuminate Pagination package.

12234.1M1.0k](/packages/illuminate-pagination)[illuminate/pipeline

The Illuminate Pipeline package.

9349.2M282](/packages/illuminate-pipeline)[illuminate/redis

The Illuminate Redis package.

8314.6M375](/packages/illuminate-redis)[illuminate/cookie

The Illuminate Cookie package.

244.6M136](/packages/illuminate-cookie)

PHPackages © 2026

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