Skip to content

Commit

Permalink
Fix bug when expiring with Carbon instance
Browse files Browse the repository at this point in the history
  • Loading branch information
stevebauman committed Oct 1, 2024
1 parent 83378a3 commit 73f9e2f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Model.php
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ public function isNot(Model $model): bool
public function setExpiry(CarbonInterface|int $seconds): void
{
if ($seconds instanceof CarbonInterface) {
$seconds = Date::now()->diffInSeconds($seconds);
$seconds = (int) Date::now()->diffInSeconds($seconds);
}

$this->newQuery()->expire($this->getHashKey(), $seconds);
Expand Down

0 comments on commit 73f9e2f

Please sign in to comment.