Issue with Another Auth Model #2086
Unanswered
jerry4rahul
asked this question in
Q&A
Replies: 1 comment
-
Very probably you configured something wrong, create a minimal application in a clean installation where you demonstrate the problem, surely when you do that you will find what you configured wrong |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Describe the bug
When we use
User
Model then it working fine.If we want to get the Auth User Roles by using
Auth::user()->roles
It successfully returning the assigned roles of user.
But the problem is Let say if we user Another Authenticable Model called
Employee
After assigning the role we are getting empty string
As I checked by finding user manually and using
with
it returns the user with rolesUser::with('roles')->find(1);
Waiting to get this problem solved.
Versions
PHP version: 7.4
To Reproduce
-- Use Another Authenticatable Model
-- Login with user
-- Use
Auth::user()->roles
-- Return will be an empty string
Beta Was this translation helpful? Give feedback.
All reactions