Call to a member function sync() on null #2450
-
when i assign role to user that time i got this error Call to a member function sync() on null i am using laravel 10 and spatie 5.8^ if any one have solution pls let me know |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 6 replies
-
With laravel 10, with don't you upgrade to spatie 5.10(current version)?
I should post some code to have some idea of what you are doing wrong, it seems to me that it is not finding the role, try to delete the spatie cache |
Beta Was this translation helpful? Give feedback.
-
Your application code, such as in your User model, probably has some method names or properties that are conflicting. |
Beta Was this translation helpful? Give feedback.
content-must-not-have-a-role-or-roles-property-nor-a-roles-method