Skip to content

Commit a8f971b

Browse files
committed
Update README.md
1 parent dafdb86 commit a8f971b

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,11 +82,13 @@ You have to define a `$versioned` array in your model that contains all versione
8282

8383
#### Get versions from database
8484

85-
By default the query builder will fetch the latest version (e. g. `User::find(1);` will return the latest version of user #1).
85+
By default the query builder will fetch the latest version (e. g. `User::find(1);` will return the latest version of user #1). If you want a specific version or all versions, you can use the following:
8686

87-
If you want to get a specific version, you have to add `version(NUMBER_OF_VERSION)` (e. g. `User::version(2)->find(1)` will return version #2 of user #1).
87+
* `version(NUMBER_OF_VERSION)` returns a specific version<br>Example: `User::version(2)->find(1)` will return version #2 of user #1
8888

89-
If you want to get all versions of an item, you can use `getAllVersions()` or `findAllVersions(ID)`, which are basically extensions of the `get()` and `find(ID)` method (e. g. `User::findAllVersions(1)` will return all versions of user #1).
89+
* `getAllVersions()` returns all versions of the queried items<br>Example: `User::getAllVersions()` will return all versions of all users
90+
91+
* `findAllVersions(ID)` returns all versions of an item<br>Example: `User::findAllVersions(1)` will return all versions of user #1
9092

9193
#### Create, update and delete
9294

0 commit comments

Comments
 (0)