|Maintainer Contact:||firstname.lastname@example.org (Coen Zimmerman)|
|Package Create Date:||2017-01-23|
|Package Last Update:||2022-11-01|
|Last Refreshed:||2023-11-27 03:00:04|
|Total Open Issues:||0|
This model comparer is a tool to make it easy to collect, log and report changes made to Eloquent models and their relations.
It's easy enough to compare model attributes before and after (or using
getDirty(), during) updates for a single Eloquent model.
Unfortunately, it is arduous to track updates while updating deeply nested relational model structures.
With this package, it's as simple as loading in the model before making changes, then loading it in again after. The comparer instance tracks the changes and offers the means to create concise changelogs.
Laravel | Package :----------------|:-------- 5.3 and older | 0.9 5.4 to 5.7 | 1.4 5.8 and up | 1.5
$ composer require czim/laravel-modelcomparer
config/app.php config, add the service provider
The result is an comparison information object that stores all the changes and offers means for easy logging.
Add singleton with facade for easy tracking of changes
Better change tracking for related models
Please see CONTRIBUTING for details.
The MIT License (MIT). Please see License File for more information.