Skip to content

Commit 3296084

Browse files
committed
Update README.md
1 parent 3d3b72f commit 3296084

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ class User extends \Illuminate\Database\Eloquent\Model
6363

6464
## Usage
6565

66-
### Tables
66+
### Database Tables
6767

6868
You need to add the following columns to your main model table:
6969

@@ -74,23 +74,23 @@ Furthermore you need a version table. The name of the version table is identical
7474
* `ref_` followed by the name of the model's primary key (if the primary key is `id`, the column name will be `ref_id`)
7575
* `version` (integer)
7676

77-
### Models
77+
### Eloquent Models
7878

7979
You have to define a `$versioned` array in your model that contains all versioned columns.
8080

81-
### Queries
81+
### Database Queries
8282

83-
#### Get versions from database
83+
#### Query the database
8484

8585
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

8787
* `version(VERSION_NO)` returns a specific version<br>Example: `User::version(2)->find(1)` will return version #2 of user #1
8888

8989
* `allVersions()` returns all versions of the queried items<br>Example: `User::allVersions()->get()` will return all versions of all users
9090

91-
#### Create, update and delete
91+
#### Create, update and delete records
9292

93-
All these operations can be performed normally. The package will automatically generate new versions and will remove all versions on delete.
93+
All these operations can be performed normally. The package will automatically generate a version 1 on create, the next version on update and will remove all versions on delete.
9494

9595
### Timestamps
9696

0 commit comments

Comments
 (0)