| Package Data | |
|---|---|
| Maintainer Username: | vluzrmos |
| Maintainer Contact: | vluzrmos@gmail.com (Vagner do Carmo) |
| Package Create Date: | 2015-12-15 |
| Package Last Update: | 2016-01-04 |
| Language: | PHP |
| License: | MIT |
| Last Refreshed: | 2025-10-30 03:04:51 |
| Package Statistics | |
|---|---|
| Total Downloads: | 31 |
| Monthly Downloads: | 0 |
| Daily Downloads: | 0 |
| Total Stars: | 0 |
| Total Watchers: | 1 |
| Total Forks: | 0 |
| Total Open Issues: | 0 |
That package listen for events in yours eloquent models and store the data that is saving/updating/creating.
composer require vluzrmos/simple-revisions
put that service provider in your config/app.php file:
Vluzrmos\SimpleRevisions\Providers\SimpleRevisionsServiceProvider::class
Run the artisan command to add the package migrations to your database migrations path:
php artisan vendor:publish --provider=Vluzrmos\SimpleRevisions\Providers\SimpleRevisionsServiceProvider
And then run your migrations:
php artisan migrate
Note: Be sure that exists an users table (that table name is in your
config/auth.php).
The model you want to log revisions should be like that:
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!