11# Laravel Checkpoint
22
33[ ![ Latest Version on Packagist] ( https://img.shields.io/packagist/v/plank/laravel-checkpoint.svg?style=flat-square )] ( https://packagist.org/packages/plank/versionable )
4- [ ![ Build Status] ( https://img.shields.io/travis/plank/laravel-checkpoint/master.svg?style=flat-square )] ( https://travis-ci.org/plank/versionable )
5- [ ![ Quality Score] ( https://img.shields.io/scrutinizer/g/plank/laravel-checkpoint.svg?style=flat-square )] ( https://scrutinizer-ci.com/g/plank/versionable )
4+ [ ![ GitHub Tests Action Status] ( https://img.shields.io/github/workflow/status/plank/laravel-checkpoint/tests?label=tests )] ( https://github.com/plank/laravel-checkpoint/actions?query=workflow%3Atests+branch%3Amaster )
65[ ![ Total Downloads] ( https://img.shields.io/packagist/dt/plank/laravel-checkpoint.svg?style=flat-square )] ( https://packagist.org/packages/plank/versionable )
76
87## Table of Contents
2726 - [ Should Revision] ( #should-revision )
2827 - [ Excluded Columns] ( #excluded-columns )
2928 - [ Excluded Relations] ( #excluded-relations )
30- - [ Testing] ( #testing )
31- - [ Changelog] ( #changelog )
29+ - [ Testing] ( #testing )
30+ - [ Changelog] ( #changelog )
3231 - [ Contributing] ( #contributing )
33- - [ Security] ( #security )
32+ - [ Security] ( #security )
3433 - [ Credits] ( #credits )
3534 - [ License] ( #license )
3635
@@ -113,8 +112,7 @@ This query scope will limit the query to return the *Model* whose ```Revision```
113112the ``` Revision ``` was created at or before the given moment.
114113
115114The moment can either be an instance of a ``` Checkpoint ```
116- using its ``` checkpoint_date ``` field, or a string representation of a date compatible with ``` Carbon::parse ``` , or a
117- ``` Carbon ``` instance.
115+ using its ``` checkpoint_date ``` field, a string representation of a date or a ``` Carbon ``` instance.
118116
119117#### since($moment)
120118``` php
@@ -126,24 +124,24 @@ since($moment = null)
126124This query scope will limit the query to return the * Model* whose ``` Revision ``` has the max primary key, where
127125the ``` Revision ``` was created after the given moment.
128126
129- The moment can either be an instance of a ``` Checkpoint ``` using its ``` checkpoint_date ``` field, or a string
130- representation of a date compatible with ``` Carbon::parse ``` , or a ``` Carbon ``` instance.
127+ The moment can either be an instance of a ``` Checkpoint ``` using its ``` checkpoint_date ``` field, a string
128+ representation of a date or a ``` Carbon ``` instance.
131129
132130#### temporal($upper, $lower)
133131``` php
134132/**
135133 * @param $upper Checkpoint|Carbon|string
136134 * @param $upper Checkpoint|Carbon|string
137135 */
138- temporal($upper = null, $lower = null)
136+ temporal($until = null, $since = null)
139137```
140138This query scope will limit the query to return the * Model* whose ``` Revision ``` has the max primary key created at
141- or before ``` $upper ``` . This method can also limit the query to the * Model* whose revision has the max primary key
142- created after ``` $lower ``` .
139+ or before ``` $until ``` . This method can also limit the query to the * Model* whose revision has the max primary key
140+ created after ``` $since ``` .
143141
144- Each argument operates independently of each other and ``` $upper ``` and ``` $lower ``` can
145- either be an instance of a ``` Checkpoint ``` using its ``` checkpoint_date ``` field, or a string representation of a date
146- compatible with ``` Carbon::parse ``` , or a ``` Carbon ``` instance.
142+ Each argument operates independently of each other and ``` $until ``` and ``` $since ``` can
143+ either be an instance of a ``` Checkpoint ``` using its ``` checkpoint_date ``` field, a string representation of a
144+ date or a ``` Carbon ``` instance.
147145
148146#### withoutRevisions()
149147``` php
@@ -186,21 +184,21 @@ cases you can add the names of the relations to the``` protected $excludedRelati
186184revisioning. Excluding all relations to the ``` Checkpoint ``` s and other related ``` Revision ``` s are handled by the
187185package.
188186
189- ### Testing
187+ ## Testing
190188
191189``` bash
192190composer test
193191```
194192
195- ### Changelog
193+ ## Changelog
196194
197195Please see [ CHANGELOG] ( CHANGELOG.md ) for more information what has changed recently.
198196
199197## Contributing
200198
201- Please see [ CONTRIBUTING] ( CONTRIBUTING.md ) for details.
199+ Please see [ CONTRIBUTING] ( .github/ CONTRIBUTING.md) for details.
202200
203- ### Security
201+ ## Security
204202
205203If you discover any security related issues, please email massimo@plankdesign.com instead of using the issue tracker.
206204
0 commit comments