Skip to content

Commit

Permalink
Merge pull request #53 from bitdegree-foundation/feature/optimise-new…
Browse files Browse the repository at this point in the history
…-visit-creation

Optimise how we found out if new visit should be created
  • Loading branch information
ousid committed Dec 19, 2023
2 parents 630238c + 652040d commit 9f9b919
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/PendingVisit.php
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 9f9b919

Please sign in to comment.