Skip to content

Commit 42d8fed

Browse files
committed
add docs for scopes
1 parent 3d4f14a commit 42d8fed

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

docs/queryparser.rst

+2
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ Currently the filter parser supports
1717
- orWhereNotBetween
1818
- withTrashed
1919
- onlyTrashed
20+
- scope
2021

2122
Sorting allows for multiple sort targets for ascending and descending sorts.
2223

@@ -39,6 +40,7 @@ columns are returned.
3940
queryparsercolumns
4041
queryparserincludes
4142
queryparserjoins
43+
queryparserscopes
4244

4345

4446
URL Parameter Format

docs/queryparserscopes.rst

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
Query Parser Scopes
2+
=====================
3+
4+
.. warning:: This feature is a bit experimental at the moment.
5+
6+
example
7+
8+
::
9+
10+
{api-uri}?scope[]=myscope
11+
12+
Allows the use of `Laravel scopes <https://laravel.com/docs/7.x/eloquent#query-scopes>`_
13+
14+
the `scope` parameter should be the name of your scope less the trailing `Scope`
15+
16+
e.g. If your scope is called `activeScope` then you would just use `active`
17+

0 commit comments

Comments
 (0)