mikewazovzky/adjustable

This package is abandoned and no longer maintained. No replacement package was suggested.

Laravel package tracks adjustment made to Eloquent Models. Before and after update field values as well as a User are saved for every database transaction.

v0.0.10 2018-07-01 14:59 UTC

This package is auto-updated.

Last update: 2022-02-01 13:07:17 UTC


README

Build Status Coverage Status

68747470733a2f2f6c61726176656c2e636f6d2f6173736574732f696d672f636f6d706f6e656e74732f6c6f676f2d6c61726176656c2e737667

Project:

mwazovzky\adjustable

Description

Laravel package that tracks adjustments made to Eloquent Model(s). Before and after update values for the fields that have been changed as well as currently authenticated User are saved for every database operation with the Model.

Version: 0.0.10

Change log:

0.0.10 project official name and documentation 0.0.1 initial project scaffolding

Documentation

See PHPDoc blocks in the code

Installation.

Pull the package into Laravel project through composer

$ composer require mwazovzky/adjustable

Publish and run package migrations

$ php artisan vendor:publish --tag=migrations --force
$ php artisan migrate

Use trait Adjustable for every Model that needs to track its adjustments.

<?php
namespace App;

use MWazovzky\Adjustable\Adjustable;
use Illuminate\Database\Eloquent\Model;

class Post extends Model
{
    use Adjustable;
    ...
}