Skip to content

Commit

Permalink
Update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
therobfonz committed Mar 21, 2022
1 parent 31d30d5 commit 2e52d57
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,27 @@ class User extends Authenticatable implements FeatureFlagsUserRoles
}
~~~

### Enable for User Teams
You can enable a feature flag for specific user teams, by using the **teams** variant in the configuration form

i.e.

~~~
{ "teams": ["Team 1", "Team 2"]}
~~~

If you don't have a teams property in your User model, you just need to implement the **FeatureFlagsEnabler** Interface and use **FeatureFlagUserRoleTrait**

~~~
use FriendsOfCat\LaravelFeatureFlags\FeatureFlagsEnabler;
use FriendsOfCat\LaravelFeatureFlags\FeatureFlagUserRoleTrait;
class User extends Authenticatable implements FeatureFlagsUserRoles
{
use AuthenticableTrait, FeatureFlagUserRoleTrait;
}
~~~

## Usage Non Auth

Sometimes you are not using this at the Auth user level, it is rare for most of our use cases but for non authenticated situations you can just use this
Expand Down

0 comments on commit 2e52d57

Please sign in to comment.