Replies: 2 comments
-
There isn't any "role specific data", but you can customize everything, there is no suggestions for that |
Beta Was this translation helpful? Give feedback.
0 replies
-
Maybe inside public function roles(): BelongsToMany
{
return $this->rolesTrait()->withPivot(['YOUR','CUSTOM','DATA']);
} laravel-permission/src/Traits/HasRoles.php Lines 122 to 123 in 79f7dbf $array[$role->getKey()] = ['YOUR'=>'CUSTOM', 'DATA'=>''] + (PermissionRegistrar::$teams && ! is_a($this, Permission::class) ?
[PermissionRegistrar::$teamsKey => getPermissionsTeamId()] : []); Or better add your own sync method |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Suppose I have users with very diverse data based on their roles, is there a suggested way on where to store these role specific data so that it is still easily accessible through the models?
Beta Was this translation helpful? Give feedback.
All reactions