From 8a867e71a1601be28b323f75f61ab95543d17028 Mon Sep 17 00:00:00 2001 From: James Cole Date: Sat, 23 May 2015 09:02:27 +0200 Subject: [PATCH] Encrypt more stuff in the cleanup routine [skip ci] --- app/Http/Middleware/Cleanup.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/app/Http/Middleware/Cleanup.php b/app/Http/Middleware/Cleanup.php index 6e332a75c5..a9d00860fd 100644 --- a/app/Http/Middleware/Cleanup.php +++ b/app/Http/Middleware/Cleanup.php @@ -229,7 +229,17 @@ class Cleanup } unset($set, $entry, $amount); - //encrypt piggy bank targetamount + // encrypt piggy bank targetamount + $set = PiggyBank::whereNull('targetamount_encrypted')->take(5)->get(); + /** @var PiggyBank $entry */ + foreach ($set as $entry) { + $count++; + $amount = $entry->targetamount; + $entry->targetamount = $amount; + $entry->save(); + } + unset($set, $entry, $amount); + //encrypt preference name (add field) //encrypt preference data (add field) //encrypt transaction amount