Skip to content
This repository was archived by the owner on Jun 2, 2024. It is now read-only.

Commit 2242961

Browse files
committed
Updated readme and changelog [ci skip]
1 parent cae03d2 commit 2242961

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ Change Log
44
### 02/23/2019 - 1.0.22
55
* Merged [Pull Request](https://github.com/filebase/Filebase/pull/47) for deleting items with a custom filter. (this adds the `delete()` method on queries.)
66
* Merged [Pull Request](https://github.com/filebase/Filebase/pull/48) for calling to the Query methods directly on the database class.
7+
* Merged [Pull Request](https://github.com/filebase/Filebase/pull/45) for sorting by update/created at times (ability to fetch `__created_at` and `__updated_at`)
78

89
### 12/26/2018 - 1.0.21
910
* Merged [Pull Request](https://github.com/filebase/Filebase/pull/30) for YAML format.

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -388,6 +388,11 @@ $db->where('name','LIKE','john')->delete(function($item){
388388
return ($item->name == 'John' && $item->email == 'some@mail.com');
389389
});
390390

391+
392+
// ability to sort the results by created at or updated at times
393+
$documents = $db->orderBy('__created_at', 'DESC')->results();
394+
$documents = $db->orderBy('__updated_at', 'DESC')->results();
395+
391396
```
392397

393398
To run the query use `results()` or if you only want to return the first item use `first()`

0 commit comments

Comments
 (0)