2017 © Pedro Peláez
 

library simple-revisions

An Eloquent simple revisions package.

image

vluzrmos/simple-revisions

An Eloquent simple revisions package.

  • Monday, January 4, 2016
  • by vluzrmos
  • Repository
  • 1 Watchers
  • 0 Stars
  • 11 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

Simple Revisions

Latest Stable Version Total Downloads Latest Unstable Version License, (*1)

That package listen for events in yours eloquent models and store the data that is saving/updating/creating., (*2)

Installation

composer require vluzrmos/simple-revisions

put that service provider in your config/app.php file:, (*3)

Vluzrmos\SimpleRevisions\Providers\SimpleRevisionsServiceProvider::class

Run the artisan command to add the package migrations to your database migrations path:, (*4)

php artisan vendor:publish --provider=Vluzrmos\SimpleRevisions\Providers\SimpleRevisionsServiceProvider

And then run your migrations:, (*5)

php artisan migrate

Note: Be sure that exists an users table (that table name is in your config/auth.php)., (*6)

Usage

The model you want to log revisions should be like that:, (*7)


use Illuminate\Database\Eloquent\Model; use Vluzrmos\SimpleRevisions\Contracts\Revisionable; use Vluzrmos\SimpleRevisions\Eloquent\RevisionableTrait; class MyModel extends Model implements Revisionable { use RevisionableTrait; }

And then, when you save, update or delete an instance of your model, it should be revisioned!, (*8)

The Versions

04/01 2016

dev-master

9999999-dev

An Eloquent simple revisions package.

  Sources   Download

MIT

The Requires

 

database laravel eloquent revisions

04/01 2016

v0.0.2

0.0.2.0

An Eloquent simple revisions package.

  Sources   Download

MIT

The Requires

 

database laravel eloquent revisions

15/12 2015

v0.0.1

0.0.1.0

An Eloquent simple revisions package.

  Sources   Download

MIT

The Requires

 

database laravel eloquent revisions