Auth::user()->id problem #2123
Answered
by
erikn69
fatihbarissahan
asked this question in
Q&A
-
Hello, I tried every way but I can't figure it out. I am using Yajra DataTable plugin and I need to hide some fields based on login user's permissions. Whatever I did, I get an error when I want to get the id of the logged in user. It works when I give the id information myself (example: user with id 1). How can I solve this problem? Another way: Here User::with('roles')->where('id',Auth::id())->first(); in its place |
Beta Was this translation helpful? Give feedback.
Answered by
erikn69
Jun 27, 2022
Replies: 1 comment 3 replies
-
Make a debug |
Beta Was this translation helpful? Give feedback.
3 replies
Answer selected by
fatihbarissahan
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Make a debug