Package Data | |
---|---|
Maintainer Username: | czim |
Maintainer Contact: | coen.zimmerman@endeavour.nl (Coen Zimmerman) |
Package Create Date: | 2017-01-23 |
Package Last Update: | 2022-11-01 |
Language: | PHP |
License: | MIT |
Last Refreshed: | 2024-12-13 15:02:18 |
Package Statistics | |
---|---|
Total Downloads: | 3,401 |
Monthly Downloads: | 64 |
Daily Downloads: | 3 |
Total Stars: | 2 |
Total Watchers: | 2 |
Total Forks: | 0 |
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
Via Composer
$ composer require czim/laravel-modelcomparer
In your config/app.php
config, add the service provider
Czim\ModelComparer\ModelComparerServiceProvider::class,
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.