Skip to content

Commit 690b51c

Browse files
authored
include approved scope
1 parent bac5310 commit 690b51c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,11 +129,15 @@ By default only Approved models will be returned on queries. To change this beha
129129

130130
#####To query the Approved Posts, run your queries as always.
131131
```php
132-
//it will return all Approved Posts
132+
//it will return all Approved Posts (strict mode)
133133
Post::all();
134134

135+
// when not in strict mode
136+
Post::approved()->get();
137+
135138
//it will return Approved Posts where title is Horse
136139
Post::where('title', 'Horse')->get();
140+
137141
```
138142
#####Query pending or rejected models.
139143
```php

0 commit comments

Comments
 (0)