"team_foreign_key" in "model_has_permissions" purpose #2335
-
Hi, I'm wondering what's the purpose of team_foreign_key in model_has_permissions. In fact I wanted to use it, so that I can give direct permission to User with particular team_id. Unluckily doing
Can I make it work, or is there any other purpose of team_foreign_key in this table? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
/ping @erikn69 |
Beta Was this translation helpful? Give feedback.
-
Documentation: working-with-teams-permissions -$user->givePermissionTo(['name' => 'resource.permission', 'team_id' => 1]);
+setPermissionsTeamId(1); // Set team_id globally for the package
+$user->givePermissionTo('resource.permission'); Also 'teams' => true, laravel-permission/config/permission.php Line 114 in 490fa00 |
Beta Was this translation helpful? Give feedback.
Documentation: working-with-teams-permissions
Also
'teams' => true,
laravel-permission/config/permission.php
Line 114 in 490fa00