Skip to content

Laravel module for making revisions to model data before inserting in DB

Notifications You must be signed in to change notification settings

v-radev/laravel-revisions-module

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Laravel Revisions Module

This is a Laravel module which listens for model create and model update events and saves the edited data and the data before the edit in another table. After that the changes can be compared and approved, which will update the actual model table, or rejected.

Requirements:

php: >= 5.5.9
laravel/framework: 5.2.*
laravelcollective/html: ^5.2
laracasts/flash: ^2.0

Installation

  • Make a Cluster/ folder within app/ and copy RevisionerCluster/ inside

  • In config/app.php to the providers array add:

App\Clusters\RevisionerCluster\Providers\RevisionerClusterServiceProvider::class
  • Run:
php artisan migrate --path=/app/Clusters/RevisionerCluster/Resources/Database/migrations
  • Run:
php artisan vendor:publish --provider="App\Clusters\RevisionerCluster\Providers\RevisionerClusterServiceProvider"
  • Use the RevisionableModelTrait in a model which you wan to be revisionable (App\Clusters\RevisionerCluster\Library\Traits\RevisionableModelTrait)

About

Laravel module for making revisions to model data before inserting in DB

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published