Assign role without team id #1853
Replies: 2 comments 1 reply
-
I had exactly the same situation, for seeding a table this is what I did. $team = Team::create(['user_id' => 1, 'name' => 'My Team', 'personal_team' => 1]); |
Beta Was this translation helpful? Give feedback.
-
Global role means you can use the same role on different teams |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I am using spatie/laravel-permission v5 and enabled teams feature.
If it is enabled, does that mean that all the roles should have a team id? I checked the documentation. It says if team id is null then it will be a global role.
But in a fresh laravel application, assigning role to a user without team id is throwing an error.
What could be the issue?
Beta Was this translation helpful? Give feedback.
All reactions