Skip to content

Commit

Permalink
Optimise how we found out if new visit should be created
Browse files Browse the repository at this point in the history
  • Loading branch information
sdapkus committed Dec 18, 2023
1 parent 630238c commit 652040d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/PendingVisit.php
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ public function __destruct()
// @phpstan-ignore-next-line
$visit = $this->model
->visits()
->where('created_at', '>=', $this->interval)
->latest()
->firstOrCreate($this->buildJsonColumns(), [
'data' => $this->attributes,
Expand Down

0 comments on commit 652040d

Please sign in to comment.