> 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
    ]);
}
```
