Skip to content

Commit

Permalink
Added README note about banned flag usage on banned() scope to in…
Browse files Browse the repository at this point in the history
…verse its meaning
  • Loading branch information
onlime committed Sep 20, 2024
1 parent cb94315 commit 6eed961
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,10 @@ $bannedTeams = Team::banned()->get();
$notBannedTeams = Team::notBanned()->get();
```

> Alternatively to `notBanned()` you may also use the `banned()` scope to filter not-banned models: `Team::banned(false)`. Like this, you could simply use the `banned` scope for e.g. [spatie/laravel-query-builder](https://spatie.be/docs/laravel-query-builder/v5/features/filtering#content-scope-filters) [Scope Filters](https://spatie.be/docs/laravel-query-builder/v5/features/filtering#content-scope-filters), instead of using more complex ways to apply either `banned` or `notBanned` scopes.
Unban

```php
$user->unban();
```
Expand Down

0 comments on commit 6eed961

Please sign in to comment.