Skip to content

JustNawaf/Revisionable

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

Revisionable

a php trait for laravel for logging model activity to database and can also be used without models.

After adding The model and migration files.

in any model add use RevisionableTrait after the model class declration.

'login' can be any message.

to exclude attributes from revision:

protected static $dontRevision = ['title','age'];

'title' and 'age' will not be revisioned

to format attributes before revision:

protected static $formatRevision = ['title' => 'Title','age'=>'Age'];

'title' will be revisioned as 'Title' and 'age' will be revisioned as 'Age'

to use it with none model:

\App\Revision::createNonModel('login');

About

a php trait for laravel for logging model activity to database and can also be used without models

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • PHP 100.0%