Skip to content

Commit b7a2de3

Browse files
authored
Return revisions in chronological order (#396)
1 parent 2ec2d38 commit b7a2de3

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/Revisions/RevisionRepository.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ public function make(): RevisionContract
1616
public function whereKey($key)
1717
{
1818
return app('statamic.eloquent.revisions.model')::where('key', $key)
19+
->orderBy('created_at')
1920
->get()
2021
->map(function ($revision) use ($key) {
2122
return $this->makeRevisionFromFile($key, $revision);

0 commit comments

Comments
 (0)