Add auth()->user() to shouldRegisterNavigation()
How to use auth()->user() function or access authenticated user through shouldRegisterNavigation() function ? :
2 Replies
What do you mean? Did you try to just add that code? Anything not working?!
In my Pages I do it with various logic, depending on the need. Here are 2 examples. (Note that
'admin'
here is a custom guard, and you may not want/need it, just use auth() instead.):