Skip to content
This repository was archived by the owner on Feb 17, 2022. It is now read-only.

Commit c977fd6

Browse files
author
Robert Kummer
committed
active forget about the session content
1 parent 81c1009 commit c977fd6

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/Ipunkt/LaravelAnalytics/TrackingBag.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,12 @@ public function add($tracking)
3939
public function get()
4040
{
4141
if (Session::has($this->sessionIdentifier)) {
42-
return Session::get($this->sessionIdentifier);
42+
$trackings = Session::get($this->sessionIdentifier);
43+
44+
// forget the session store data
45+
Session::forget($this->sessionIdentifier);
46+
47+
return $trackings;
4348
}
4449

4550
return [];

0 commit comments

Comments
 (0)