Download the PHP package bluora/laravel-model-change-tracking without Composer
On this page you can find all versions of the php package bluora/laravel-model-change-tracking. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download bluora/laravel-model-change-tracking
More information about bluora/laravel-model-change-tracking
Files in bluora/laravel-model-change-tracking
Package laravel-model-change-tracking
Short Description Provides support for tracking current user against model changes for the Eloquent ORM
License MIT
Informations about the package laravel-model-change-tracking
Change tracking for Laravel Eloquent model's
This package provides a number of traits to track changes made to a model.
Install
Via composer:
$ composer require hnhdigital-os/laravel-model-change-tracking ~1.0
This package's service provider will autoload from Laravel 5.5.
To enable the service provider in versions prior to Laravel 5.4, edit the config/app.php:
State Change
Track state changes on your model and by which user for the following states - created
, updated
, deleted
, and restored
.
Attribute Change Trait
Adds a saving
event to the model to track changes to all attribute values.
Change by User Trait
Adds events to set a attribute to the current user for when a model is created
, updated
, archived
, or deleted
.
Usage
User tracking of changes.
Add a created_by
, updated_by
, archived_by
, and deleted_by
attributes to your model's database table.
Turn off tracking attribute
You can turn off by returning false.
Different attribute name
You can specify the attribute name in the return value.
Track state changes of models
Tracks model state changes externally in database table.
Log each attribute value change
Tracks attribute value changes.