Skip to content

Commit

Permalink
include approved scope
Browse files Browse the repository at this point in the history
  • Loading branch information
hootlex authored Feb 15, 2017
1 parent bac5310 commit 690b51c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,11 +129,15 @@ By default only Approved models will be returned on queries. To change this beha

#####To query the Approved Posts, run your queries as always.
```php
//it will return all Approved Posts
//it will return all Approved Posts (strict mode)
Post::all();

// when not in strict mode
Post::approved()->get();

//it will return Approved Posts where title is Horse
Post::where('title', 'Horse')->get();

```
#####Query pending or rejected models.
```php
Expand Down

0 comments on commit 690b51c

Please # to comment.