> For the complete documentation index, see [llms.txt](https://docs.tomatophp.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.tomatophp.com/tomato-admin/menu.md).

# Menus

it's a very easy-to-use menu provider by just using this class method on your app service provider

```php
use TomatoPHP\TomatoAdmin\Facade\TomatoMenu;
use TomatoPHP\TomatoAdmin\Services\Contracts\Menu;

public function boot()
{
     TomatoMenu::register([
           Menu::make()
            ->group(__('ALC'))
            ->label(__('Users'))
            ->icon('bx bx-user')
            ->route('admin.users.index'),
           Menu::make()
            ->group(__('ALC'))
            ->label(__('Roles'))
            ->icon('bx bx-lock')
            ->route('admin.roles.index')
    ]);
}
```

and the menu will auto registered to your sidebar of the admin dashboard

you can order the groups or hide a group using this method

```php
use TomatoPHP\TomatoAdmin\Facade\TomatoMenu;

public function boot()
{
    TomatoMenu::groups([
        __('ALC') => true,
        __('Settings') => false, //Hidden
    ]);
}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.tomatophp.com/tomato-admin/menu.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
