# Боковое меню

Настроить меню в сайдбаре можно в конфиге adminlte.

```php
// config/adminlte.php

'menu' => [
    // Navbar items:
    [
        'type'         => 'navbar-search',
        'text'         => 'search',
        'topnav_right' => true,
    ],
...
```

Для удобства вынесем настройку меню в отдельный класс MenuHelper

```php
// app/Helpers/MenuHelper.php

<?php

namespace App\Helpers;

class MenuHelper
{
    public static function getMenu(): array
    {
        return [
            ['header' => 'РАЗДЕЛЫ САЙТА'],
            [
                'text' => 'Новости',
                'icon' => 'far fa-fw fa-file',
                'submenu' => [
                    [
                        'icon' => '',
                        'shift' => 'ml-4',
                        'text' => 'Список новостей',
                        'route' => 'news.list',
                        'active' => ['admin/posts/*']
                    ],
                ],
            ],
        ];
    }
}
```

И используем его в конфиге adminlte.

```php
// config/adminlte.php

'menu' => \App\Helpers\MenuHelper::getMenu(),
```

Подробнее почитать про настройку меню можно в доках adminlte:

* <https://github.com/jeroennoten/Laravel-AdminLTE/wiki/Menu-Configuration>
* <https://github.com/jeroennoten/Laravel-AdminLTE/wiki/Special-Menu-Items>


---

# Agent Instructions: 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://web-vovan.gitbook.io/rock-cms/nastroika/bokovoe-menyu.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.
