PHPackages                             sofa/revisionable - 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. sofa/revisionable

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

sofa/revisionable
=================

Nice and easy way to handle revisions of your db.

v5.7.2(3y ago)258192.1k—3.3%42[3 issues](https://github.com/jarektkaczyk/revisionable/issues)2MITPHPPHP &gt;=7.2.5

Since Dec 11Pushed 2y ago11 watchersCompare

[ Source](https://github.com/jarektkaczyk/revisionable)[ Packagist](https://packagist.org/packages/sofa/revisionable)[ Fund](https://softonsofa.com)[ GitHub Sponsors](https://github.com/jarektkaczyk)[ RSS](/packages/sofa-revisionable/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (6)Versions (45)Used By (2)

Sofa/Revisionable
=================

[](#sofarevisionable)

[![Code quality](https://camo.githubusercontent.com/22a5b7f1d8115f6fecad9f8074ae6e0f9fceff747f48b55d93b63a905173822f/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6a6172656b746b61637a796b2f7265766973696f6e61626c652f6261646765732f7175616c6974792d73636f72652e706e673f623d312e30)](https://scrutinizer-ci.com/g/jarektkaczyk/revisionable) [![Latest Stable Version](https://camo.githubusercontent.com/cd5cedf59c75660a34089ba6bc1710d1097aa53a98d0e1acec0300b38a6017fb/68747470733a2f2f706f7365722e707567782e6f72672f736f66612f7265766973696f6e61626c652f762f737461626c652e737667)](https://packagist.org/packages/sofa/revisionable) [![Downloads](https://camo.githubusercontent.com/f006aea65de37a66d3645b87ac6f29eac93b06fa07b0eb88fd2ea11ea0b1defe/68747470733a2f2f706f7365722e707567782e6f72672f736f66612f7265766973696f6e61626c652f646f776e6c6f6164732e737667)](https://packagist.org/packages/sofa/revisionable)

Nice and easy way to handle revisions of your db.

- Handles the revisions in **bulk** - one entry covers all the created/updated fields, what makes it really **easy to eg. compare 2 given versions** or get all the data changed during single action.

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

[](#requirements)

- This package requires PHP 5.4+
- Currently it works out of the box with Laravel5 + generic Illuminate Guard, tymon/jwt-auth OR cartalyst/sentry 2/sentinel 2

Usage (Laravel5 basic example - see Customization below as well)
----------------------------------------------------------------

[](#usage-laravel5-basic-example---see-customization-below-as-well)

### 1. Download the package or require in your `composer.json`:

[](#1-download-the-package-or-require-in-your-composerjson)

```
composer require sofa/revisionable

```

### 2. Add the service provider to your `app/config/app.php`:

[](#2-add-the-service-provider-to-your-appconfigappphp)

```
    'providers' => array(

        ...

        'Sofa\Revisionable\Laravel\ServiceProvider',
    ),
```

### 3. Publish the package config file:

[](#3-publish-the-package-config-file)

```
~$ php artisan vendor:publish [--provider="Sofa\Revisionable\Laravel\ServiceProvider"]

```

this will create `config/sofa_revisionable.php` file, where you can adjust a few settings:

```
