VentureCraft / revisionable

Easily create a revision history for any laravel model
http://twitter.com/duellsy
MIT License
2.55k stars 348 forks source link

Encrypted values not decrypting on read #432

Open FinnThorwarth opened 7 months ago

FinnThorwarth commented 7 months ago

Hey, my Model got encrypted fields like:

protected $casts = [
        'first_name' => 'encrypted',
        'last_name' => 'encrypted',
        'email' => 'encrypted',
        'phone' => 'encrypted',
        'address' => 'encrypted',
        'smartphone' => 'encrypted',
    ];

The old and the new value are stored correctly in the revisions. But its not decrypted on read.

Maybe there is a way to set a boolean value that the new and old value are encrypted and on read the values going to be decrypted.