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

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

konekt/history
==============

Eloquent Model History for Laravel

1.9.1(4mo ago)03.3kMITPHPPHP ^8.2CI passing

Since Nov 16Pushed 4mo ago1 watchersCompare

[ Source](https://github.com/artkonekt/history)[ Packagist](https://packagist.org/packages/konekt/history)[ GitHub Sponsors](https://github.com/fulopattila122)[ RSS](/packages/konekt-history/feed)WikiDiscussions master Synced 1mo ago

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

Eloquent Model History
======================

[](#eloquent-model-history)

[![Tests](https://camo.githubusercontent.com/bf4af6923d7fca2581f9d097ee69a053d1b9f29686fdd36b1a8987fb00364827/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6172746b6f6e656b742f686973746f72792f74657374732e796d6c3f6272616e63683d6d6173746572267374796c653d666c61742d737175617265)](https://github.com/artkonekt/history/actions?query=workflow%3Atests)[![Packagist version](https://camo.githubusercontent.com/84e2eda8723b60996ac7bd3a486168bfb24355c2339ac4727cd5a404d2bd1843/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6b6f6e656b742f686973746f72792e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/konekt/history)[![Packagist downloads](https://camo.githubusercontent.com/d58391026e8c1b0c4f32a1189c616fcc9c063987e7c5c8004c4ba114cb34d902/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6b6f6e656b742f686973746f72792e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/konekt/history)[![StyleCI](https://camo.githubusercontent.com/63ac41f6b4391483556bdb009eefda1caa21279ef54ccaf4eafe68b662fb4bf6/68747470733a2f2f7374796c6563692e696f2f7265706f732f3731373735363636332f736869656c643f6272616e63683d6d6173746572)](https://styleci.io/repos/717756663)[![MIT Software License](https://camo.githubusercontent.com/942e017bf0672002dd32a857c95d66f28c5900ab541838c6c664442516309c8a/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)

This package provides features to:

1. Log changes, diff and comments to **Eloquent Models**;
2. Track and log the execution history of Laravel **Background Jobs**;

Model History
-------------

[](#model-history)

**Features**:

- Record model creation, update, delete, and retrieval
- Add optional comments to events
- Add comment-only history events
- Automatically record the IP, URL, user agent and user ids when in an HTTP context
- Automatically detect the CLI, the command name when in an artisan command
- Automatically detect the queue and the job when running in a queued job
- Define included/excluded fields on a per-model basis
- Has a diff of the changed fields (old/new values)

```
$task = Task::create(['title' => 'Get milk', 'status' => 'todo']);
History::begin($task);

$task->update(['status' => 'done']);
History::logRecentUpdate($task);
```

Job History
-----------

[](#job-history)

The goal of tracking a job is to be able to show the status and updates of a background job on frontends. It is similar to logging, but is always scoped to a given job execution, and adds state to each job execution.

**Features**:

- Track the execution status of Laravel Jobs
- Set and read the completion % of a job execution
- Write logs for job executions
- Detect the user that has executed the job

```
class MyJob implements \Konekt\History\Contracts\TrackableJob
{
    use \Konekt\History\Concerns\CanBeTracked;

    public function __construct(private array $dataToProcess)
    {
    }

    public function handle()
    {
        $tracker = $this->jobTracker();
        $tracker->setProgressMax(count($this->dataToProcess));
        $tracker->started();
        try {
            foreach ($this->dataToProcess as $data) {
                Do::something()->withThe($data);
                $tracker->advance();
                $tracker->logInfo('An entry was processed');
            }
            $tracker->completed();
        } catch (\Throwable $e) {
            $tracker->failed($e->getMessage());
        }
    }
}

MyJob::dispatch($myDataToProcess);
```

Requirements
------------

[](#requirements)

It requires PHP 8.2+ and Laravel 10, 11 or 12. (PHP 8.1 supported up to version 1.7)

It has been tested with:

- PHP 8.1, 8.2, 8.3, 8.4 &amp; 8.5
- SQLite,
- MySQL 5.7, 8.0, 8.2 &amp; 8.4,
- PostgreSQL 12, 16 &amp; 17.

It is known that this library, **Laravel 11.0/12.0 and PostgreSQL 11 don't work together**, therefore it is recommended to use at least Postgres version 12 or higher in case your DB engine is Postgres.

Documentation
-------------

[](#documentation)

For Installation and usage instruction see the Documentation;

###  Health Score

44

—

FairBetter than 92% of packages

Maintenance74

Regular maintenance activity

Popularity19

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 90% 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 ~55 days

Recently: every ~74 days

Total

15

Last Release

143d ago

PHP version history (2 changes)1.0.0PHP ^8.1

1.8.0PHP ^8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/9c398dd02c93ecf6aa344f367f5744aeb32b4c7bbc23b1b22e95336f45bf0d5a?d=identicon)[konekt](/maintainers/konekt)

---

Top Contributors

[![fulopattila122](https://avatars.githubusercontent.com/u/1162360?v=4)](https://github.com/fulopattila122 "fulopattila122 (90 commits)")[![StyleCIBot](https://avatars.githubusercontent.com/u/11048387?v=4)](https://github.com/StyleCIBot "StyleCIBot (10 commits)")

---

Tags

laraveleloquenthistorykonekt

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[cviebrock/eloquent-sluggable

Easy creation of slugs for your Eloquent models in Laravel

4.0k13.6M253](/packages/cviebrock-eloquent-sluggable)[tucker-eric/eloquentfilter

An Eloquent way to filter Eloquent Models

1.8k4.8M26](/packages/tucker-eric-eloquentfilter)[watson/validating

Eloquent model validating trait.

9723.3M47](/packages/watson-validating)[cybercog/laravel-love

Make Laravel Eloquent models reactable with any type of emotions in a minutes!

1.2k302.7k1](/packages/cybercog-laravel-love)[cviebrock/eloquent-taggable

Easy ability to tag your Eloquent models in Laravel.

567694.8k3](/packages/cviebrock-eloquent-taggable)[reedware/laravel-relation-joins

Adds the ability to join on a relationship by name.

2121.2M13](/packages/reedware-laravel-relation-joins)

PHPackages © 2026

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