From 68717f0df65934c6dd5c004e704a5af24b2881ee Mon Sep 17 00:00:00 2001 From: philipp lang Date: Wed, 23 Jun 2021 23:38:56 +0200 Subject: [PATCH] Store created date of cookie --- src/Cookies/CacheCookie.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/Cookies/CacheCookie.php b/src/Cookies/CacheCookie.php index 98f7a43..38518da 100644 --- a/src/Cookies/CacheCookie.php +++ b/src/Cookies/CacheCookie.php @@ -22,7 +22,10 @@ class CacheCookie { * Store the current cookie in the cache */ public function store($mglnr) { - Cache::forever("namicookie-{$mglnr}", $this->store->getCookieByName('JSESSIONID')->getValue()); + Cache::forever("namicookie-{$mglnr}", [ + 'cookie' => $this->store->getCookieByName('JSESSIONID')->getValue(), + 'created_at' => now(), + ]); } /** @@ -43,7 +46,7 @@ class CacheCookie { return false; } - $this->set($mglnr, $cookie); + $this->set($mglnr, $cookie['cookie']); return true; }