Skip to content

Commit d415782

Browse files
author
Anton Komarev
authored
Update README.md
Clarify how flags are working
1 parent a8ab28f commit d415782

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,11 +82,13 @@ There are 2 types of flags:
8282

8383
All flags separated on 2 logical groups:
8484

85-
- `Classic` flags displays only entities with `true` or `timestamp` flag value.
86-
- `Inverse` flags displays only entities with `false` or `null` flag value.
85+
- `Classic` flags displays by default only entities with `true` or `timestamp` flag value.
86+
- `Inverse` flags displays by default only entities with `false` or `null` flag value.
8787

8888
Omitted entities could be retrieved by using special global scope methods, unique for each flag.
8989

90+
> **Example:** If your `Article` model has `PublishedAt` flag then `Article::get()` will return you only published records. When you need to get only unpublished records you could call `Article::onlyUnpublished()->get()` and `Article::withUnpublished()->get()` will return you published and unpublished articles as well.
91+
9092
## Installation
9193

9294
Pull in the package through Composer.

0 commit comments

Comments
 (0)