-
Greetings, First of all, thanks for the package! I run my migrations and im using just roles (no permissions so far) and i have the user, role and model_has_role tabes, filled correctly. On User model i have this:
but when i try to check the role from user always return false:
Even if i try this to get all users with a certain role only return an empty collection:
I think the package is correctly installed because if i try to get info from a role that doesn't exist it returns the right message:
Any advice? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
|
Beta Was this translation helpful? Give feedback.
-
@erikn69 hi.. i have the same problem.. the problem is, i try to put the different name for guard_name.
when i tried to create user with assignRole customer is error with message
and everthing roled name with web guard_name got no errors |
Beta Was this translation helpful? Give feedback.
-
@devkuros be careful with uppercase letters, the role 'Customer' could not be the same as the role 'customer'. My problem was solved: on table 'model_has_roles' the model_type field was Thanks for your time! |
Beta Was this translation helpful? Give feedback.
@devkuros be careful with uppercase letters, the role 'Customer' could not be the same as the role 'customer'.
My problem was solved: on table 'model_has_roles' the model_type field was
App\User
but i've updated my project to Laravel 8 and the models are now on a Models folder. So, the model_type has to beApp\Models\User
so the relation could exist.Thanks for your time!