jeudi 12 juillet 2018

Laravel VentureCraft revisionable not working on Laravel 5.5 when updating model

I used this package called revisionable so I tried to add it to my package.json and run the migration and everything worked fine.

But when I try to create a record and then update them it doesn't fill out the revisions table?

I am using "venturecraft/revisionable": "^1.28", and Laravel 5.5

Here is my code in my model

So here is what I have done in my model

use Venturecraft\Revisionable\Revisionable;
use Venturecraft\Revisionable\RevisionableTrait;

class AnalysisRequest extends Revisionable
{
    use SoftDeletes;
    use RevisionableTrait;

    protected $revisionEnabled = true;
    protected $revisionCleanup = true;
    protected $historyLimit = 100; //Stop tracking revisions after 500 changes have been made.

    protected $dontKeepRevisionOf = array(
        'client_id', 'service_id', 'categories_id', 'methodologies_id', 'current_version', 'due_date'
    );

    protected $keepRevisionOf = array(
        'sample_description',
        'special_instruction',
        'status',
        'rushable'
    );

When did I did wrong?

Can someone shed some light for me. Thanks in advance.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire