Skip to content

Commit

Permalink
Updated readme.md with new FeatureFlagUserRoleTrait imlementation
Browse files Browse the repository at this point in the history
  • Loading branch information
cvyz committed Oct 1, 2020
1 parent c9e8263 commit c26e2ac
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions readme.md
Expand Up @@ -138,18 +138,15 @@ i.e.
{ "roles": ["admin", "dev"]}
~~~

If you don't have a roles property in your User model, you just need to implement the **FeatureFlagsUserRoles** Interface and the following method
If you don't have a roles property in your User model, you just need to implement the **FeatureFlagsUserRoles** Interface and use **FeatureFlagUserRoleTrait**

~~~
use FriendsOfCat\LaravelFeatureFlags\FeatureFlagsUserRoles;
use FriendsOfCat\LaravelFeatureFlags\FeatureFlagUserRoleTrait;
class User extends Authenticatable implements FeatureFlagsUserRoles
{
public function getRolesForFeatureFlags(): ?array
{
// return user roles array
}
use AuthenticableTrait, FeatureFlagUserRoleTrait;
}
~~~

Expand Down

0 comments on commit c26e2ac

Please sign in to comment.