Replies: 1 comment 1 reply
-
$user = auth()->user();
setPermissionsTeamId(1);
$user->load('roles', 'permissions'); |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
drbyte
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
After installation it together with the teams addition and configured everything, I was testing the relationships with User::find($id) and everything worked. So I was happy and started programming using the auth()->user() object. And it was confusing at first, I was thinking I broke something. But then I reinstalled everything and tested directly with auth user which always gives me empty arrays or false.
And In any Controller:
Prints:
But if I do the same with:
Can anyone tell me if that is the normal behaviour or is something really broken? Also how can I get it to work together with auth user?
Beta Was this translation helpful? Give feedback.
All reactions