You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+34Lines changed: 34 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -170,6 +170,40 @@ $jobs = $pace->job
170
170
->find();
171
171
```
172
172
173
+
### Limiting
174
+
175
+
Use the `offset()` and `limit()` methods to limit your results. The default offset is 0 if it is not specified.
176
+
177
+
```php
178
+
$jobs = $pace->job
179
+
->filter('adminStatus/@openJob', true)
180
+
->sort('@dateSetup', true)
181
+
->limit(50)
182
+
->find();
183
+
```
184
+
185
+
You can also use the `paginate()` method to set the offset and limit for a page.
186
+
187
+
```php
188
+
$jobs = $pace->job
189
+
->filter('adminStatus/@openJob', true)
190
+
->sort('@dateSetup', true)
191
+
->paginate(1, 50)
192
+
->find();
193
+
```
194
+
195
+
### Eager loading
196
+
197
+
The `load()` method preloads the models as part of the find request, using the find object aggregate service. It does not read the entire object; you must specify a list of fields in XPath. If the offset and limit are not specified, then 0 and 1,000 will be used by default.
Dates are automatically converted to and from [Carbon](http://carbon.nesbot.com/) instances. Check out the `Soap\DateTimeMapper` and `Soap\Factory` classes if you want to see how this happens.
0 commit comments