From 6eed961ad7c724b03120226436ebed45705ef03a Mon Sep 17 00:00:00 2001 From: Philip Iezzi Date: Fri, 20 Sep 2024 18:19:22 +0200 Subject: [PATCH] Added README note about `banned` flag usage on `banned()` scope to inverse its meaning --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 14b6a22..ee7071b 100644 --- a/README.md +++ b/README.md @@ -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(); ```