Skip to content

Commit 265ef41

Browse files
committed
Merge pull request #445 from jdsingh/master
update readme
2 parents 850bc18 + e613d8f commit 265ef41

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

README.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,18 @@ $this->embedsMany('Book', '_books');
1717

1818
Read the full changelog at https://github.com/jenssegers/laravel-mongodb/releases/tag/v2.0.0
1919

20+
Table of contents
21+
-----------------
22+
* [Installation](#installation)
23+
* [Configuration](#configuration)
24+
* [Eloquent](#eloquent)
25+
* [Optional: Alias](#optional-alias)
26+
* [Query Builder](#query-builder)
27+
* [Schema](#schema)
28+
* [Extensions](#extensions)
29+
* [Troubleshooting](#troubleshooting)
30+
* [Examples](#examples)
31+
2032
Installation
2133
------------
2234

@@ -822,6 +834,15 @@ You can apply projections to your queries using the `project` method.
822834
DB::collection('items')->project(array('tags' => array('$slice' => 1)))->get();
823835
```
824836

837+
**Projections with Pagination**
838+
839+
```php
840+
$limit = 25;
841+
$projections = array('id', 'name');
842+
DB::collection('items')->paginate($limit, $projections);
843+
```
844+
845+
825846
**Push**
826847

827848
Add an items to an array.

0 commit comments

Comments
 (0)