Skip to content

Commit 246ede0

Browse files
authored
Merge pull request #129 from stephengalbraith/patch-2
2 parents 09d885b + 0bdbd7c commit 246ede0

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

docs/development/services/model/fetching.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,17 @@ The operator is optional and will default to `==` if not given:
4646
By default, filters will be chained as `AND` conditions. An `OR` filter can be applied by using the `orFilter()` method:
4747

4848
->filter('username' 'bob')
49-
->orFilter('group_id', 1)
49+
->orFilter('role_id', 1)
50+
51+
For more complex calls, filters can be grouped by using the `filterGroup()`, `orFilterGroup()`, and `endFilterGroup()` methods:
52+
53+
// filter members who have less than 10 entries AND either have a primary role_id of 1 OR 2.
54+
->filter('total_entries', '<', '10')
55+
->filterGroup()
56+
->filter('role_id', '1')
57+
->orFilter('role_id', '2')
58+
->endFilterGroup()
59+
5060

5161
### Available filters
5262

0 commit comments

Comments
 (0)