sasin91/laravel-versionable

Enables versioning of Eloquent models.

dev-master 2018-04-05 22:57 UTC

This package is auto-updated.

Last update: 2024-11-12 04:27:26 UTC


README

This package makes it a breeze to version your eloquent models, allowing the developer(s) to easily revert to a previous state or even ressurect a deleted model!

Installation

You can install the package via composer:

composer require sasin91/laravel-versionable
php artisan vendor:publish --provider="Sasin91\LaravelVersionable\VersionableServiceProvider"

Configuration

Edit the versionable.php file in your config directory, after publishing.

Usage

Use the Sasin91\LaravelVersionable\Versionable trait in your eloquent models.

example

use Illuminate\Database\Eloquent\Model as Eloquent;
use Sasin91\LaravelVersionable\Versionable;

class YourModel extends Eloquent 
{
	use Versionable;
	//
}

Testing

composer test

Security

If you discover any security related issues, please email jonas.kerwin.hansen@gmail.com instead of using the issue tracker.

License

The MIT License (MIT). Please see License File for more information.