Asigning role to existant user on Team

New battle against Roles. Using this plugin to create roles + permissions and associate role to user. (https://filamentphp.com/plugins/tharinda-rodrigo-spatie-roles-permissions) When associating role to User I've got this message. Note that I've add team_id foreign on role, permission and model_has_roles + model_has_permissions table to make all Tenant + Roles + Permissions working with users
Filament
Spatie Roles Permissions by Tharinda Rodrigo - Filament
Filament support for spatie/laravel-permission.
No description
4 Replies
Kerchack
KerchackOP15mo ago
Is there a way to associate manually current team_id for this insert?
tharindarodrigo
tharindarodrigo15mo ago
I will look into this matter over the weekend.
Kerchack
KerchackOP15mo ago
Thank you so much @tharindarodrigo
tharindarodrigo
tharindarodrigo15mo ago
@kerchack_ast Does this happen within your UserResource when you try to attach Role to the user? Probably using the following?
Select::make('roles')
->multiple()
->preload()
Select::make('roles')
->multiple()
->preload()
Want results from more Discord servers?
Add your server