Skip to content

Commit

Permalink
Merge pull request #9 from thewebartisan7/patch-2
Browse files Browse the repository at this point in the history
Fix remove old version
  • Loading branch information
overtrue authored Mar 19, 2020
2 parents e01b9ab + 99ea46a commit 120d038
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Versionable.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public function removeOldVersions(int $keep): void
return;
}

$this->versions()->skip($keep)->take($keep)->get()->each->delete();
$this->versions()->skip($keep)->take(PHP_INT_MAX)->get()->each->delete();
}

public function removeAllVersions()
Expand Down

0 comments on commit 120d038

Please sign in to comment.