PHPackages                             chapdel/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. chapdel/history

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

chapdel/history
===============

Eloquent model history tracking for Laravel

1.1.0(3y ago)1124MITPHPPHP ^7.2|^7.2.5|^7.3|^8.0|^8.1|^8.2

Since Feb 24Pushed 3y agoCompare

[ Source](https://github.com/chapdel/history)[ Packagist](https://packagist.org/packages/chapdel/history)[ Docs](https://github.com/seancheung/history)[ RSS](/packages/chapdel-history/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)Dependencies (1)Versions (3)Used By (0)

[![Test Status](https://github.com/seancheung/history/workflows/Test/badge.svg)](https://github.com/seancheung/history/actions)[![Test Status](https://camo.githubusercontent.com/d5566640ea8177bee32be6da06b28f5e60b38669f447d7eaa97b462a628d2955/68747470733a2f2f7472617669732d63692e6f72672f7365616e636865756e672f686973746f72792e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/seancheung/history)[![Coverage Status](https://camo.githubusercontent.com/e6d846b983ed46637980a2698bccbf5f7ece4ec431992f20c5b18e335a86b957/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f7365616e636865756e672f686973746f72792f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/github/seancheung/history?branch=master)[![Total Downloads](https://camo.githubusercontent.com/67a16704aade496b692a099113849416a4f8e8706f77ff73960459bdbf0d2ba4/68747470733a2f2f706f7365722e707567782e6f72672f70616e6f73636170652f686973746f72792f646f776e6c6f616473)](https://packagist.org/packages/panoscape/history)[![Latest Stable Version](https://camo.githubusercontent.com/62e2ed9284185f1988b55fd1c3969733bc591b7c3b65bad2a8c42efc9cc2df1c/68747470733a2f2f706f7365722e707567782e6f72672f70616e6f73636170652f686973746f72792f76)](https://packagist.org/packages/panoscape/history)[![License](https://camo.githubusercontent.com/f41a33bcd10597151baf4d85dad797fef9f118bde5cfd3cb6e136836ff02f6a1/68747470733a2f2f706f7365722e707567782e6f72672f70616e6f73636170652f686973746f72792f6c6963656e7365)](https://packagist.org/packages/panoscape/history)

History
=======

[](#history)

Eloquent model history tracking for Laravel (NOW WITH AUTOLOAD!)

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

[](#installation)

### Composer

[](#composer)

Laravel 6.x and above

```
composer require panoscape/history
```

Laravel 5.6.x

```
composer require "panoscape/history:^1.0"
```

### Service provider and alias

[](#service-provider-and-alias)

> Only required for Laravel 5.6.x

> NO NEED for version 2.0+ which is auto-loaded with [Package Discovery](https://laravel.com/docs/6.x/packages#package-discovery)

*config/app.php*

```
'providers' => [
    ...
    Panoscape\History\HistoryServiceProvider::class,
];
'aliases' => [
    ...
    'App\History' => Panoscape\History\History::class,
];
```

### Migration

[](#migration)

```
php artisan vendor:publish --provider="Panoscape\History\HistoryServiceProvider" --tag=migrations
```

### Config

[](#config)

```
php artisan vendor:publish --provider="Panoscape\History\HistoryServiceProvider" --tag=config
```

Localization
------------

[](#localization)

```
php artisan vendor:publish --provider="Panoscape\History\HistoryServiceProvider" --tag=translations
```

Usage
-----

[](#usage)

Add `HasOperations` trait to user model.

```
