mouadziani/laravel-model-trackable

A laravel package that allows you to tracker and log nested changes applied on your models and their relations using a single Trait


Keywords
mouadziani, laravel-model-trackable, laravel, laravel-package, php
License
MIT

Documentation

Laravel Models Tracker

Latest Version on Packagist Total Downloads

A laravel package that allows you to track and log nested changes applied on your (models, and their relations) using a single Trait

Installation

You can install the package via composer:

composer require mouadziani/laravel-model-trackable

Simple Usage

use LaravelModelTrackable\Traits\Trackable;

class ModelName extends Model
{
    use Trackable;

    //
}
Then you can get array of changed attribute after every update
$model = ModelName::update([
    ...
]);

// Get list of changed attributes
$model->getChangedAttributes();

Testing

composer test

Changelog

Please see CHANGELOG for more information what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email mouad.ziani1997@gmail.com instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.