Spatie roles and permissions team feature
How to fix this issue please, I'm adding new user how can I set a value and use setPermissionsTeamId function
7 Replies
check fillable in ur model
Please share some code.
@Dennis Koch I need to set the company id using setPermissionsTeamId, I'm getting this error when I'm creating new user and setting the role.
The name should give you a hint.
afterCreate()
runs after creation. Therefore it is too late to add non-nullable values. Use a render hook that runs before saving.@Dennis Koch What should I use?sorry I'm new I also tried the beforeCreate
I don't even know where you are using this/in which context because you never explained
@Dennis Koch I'm using this plugin https://v2.filamentphp.com/plugins/althinect-spatie-roles-permissions