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

Commit

Permalink
Updated readme and changelog [ci skip]
Browse files Browse the repository at this point in the history
  • Loading branch information
timothymarois committed Feb 23, 2019
1 parent cae03d2 commit 2242961
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ Change Log
### 02/23/2019 - 1.0.22
* Merged [Pull Request](https://github.com/filebase/Filebase/pull/47) for deleting items with a custom filter. (this adds the `delete()` method on queries.)
* Merged [Pull Request](https://github.com/filebase/Filebase/pull/48) for calling to the Query methods directly on the database class.
* 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`)

### 12/26/2018 - 1.0.21
* Merged [Pull Request](https://github.com/filebase/Filebase/pull/30) for YAML format.
Expand Down
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -388,6 +388,11 @@ $db->where('name','LIKE','john')->delete(function($item){
return ($item->name == 'John' && $item->email == '[email protected]');
});


// ability to sort the results by created at or updated at times
$documents = $db->orderBy('__created_at', 'DESC')->results();
$documents = $db->orderBy('__updated_at', 'DESC')->results();

```

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

0 comments on commit 2242961

Please sign in to comment.