Introduction
The user menu is featured in the top right corner of the admin layout. It’s fully customizable. Each menu item is represented by an action, and can be customized in the same way. To register new items, you can pass the actions to theuserMenuItems() method of the configuration:
Moving the user menu to the sidebar
By default, the user menu is positioned in the topbar. If the topbar is disabled, it is added to the sidebar. You can choose to always move it to the sidebar by passing aposition argument to the userMenu() method in the configuration:
Customizing the profile link
To customize the user profile link at the start of the user menu, register a new item with theprofile array key, and pass a function that customizes the action object:
Customizing the logout link
To customize the user logout link at the end of the user menu, register a new item with thelogout array key, and pass a function that customizes the action object:
Conditionally hiding user menu items
You can also conditionally hide a user menu item by using thevisible() or hidden() methods, passing in a condition to check. Passing a function will defer condition evaluation until the menu is actually being rendered:
Sending a POST HTTP request from a user menu item
You can send a POST HTTP request from a user menu item by passing a URL to the url() method, and also using postToUrl():
Disabling the user menu
You may disable the user menu entirely by passingfalse to the userMenu() method: