diff --git a/.idea/sonarlint/issuestore/3/8/38ac5fc300d52f94b369e87fbb1937abe29f831f b/.idea/sonarlint/issuestore/3/8/38ac5fc300d52f94b369e87fbb1937abe29f831f
new file mode 100644
index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
diff --git a/.idea/sonarlint/issuestore/index.pb b/.idea/sonarlint/issuestore/index.pb
index b6bd383fba48b306652314f6a74176bf887010fd..75525eea3e78241804013b290d483acee3848202 100644
--- a/.idea/sonarlint/issuestore/index.pb
+++ b/.idea/sonarlint/issuestore/index.pb
@@ -1,3 +1,5 @@
 
 Q
-!src/Controller/HomeController.php,a\d\ad8b439416d1e02614f47c5b471c7c4e587dca82
\ No newline at end of file
+!src/Controller/HomeController.php,a\d\ad8b439416d1e02614f47c5b471c7c4e587dca82
+H
+templates/home.html.twig,3\8\38ac5fc300d52f94b369e87fbb1937abe29f831f
\ No newline at end of file
diff --git a/.idea/sonarlint/securityhotspotstore/3/8/38ac5fc300d52f94b369e87fbb1937abe29f831f b/.idea/sonarlint/securityhotspotstore/3/8/38ac5fc300d52f94b369e87fbb1937abe29f831f
new file mode 100644
index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
diff --git a/.idea/sonarlint/securityhotspotstore/index.pb b/.idea/sonarlint/securityhotspotstore/index.pb
index b6bd383fba48b306652314f6a74176bf887010fd..75525eea3e78241804013b290d483acee3848202 100644
--- a/.idea/sonarlint/securityhotspotstore/index.pb
+++ b/.idea/sonarlint/securityhotspotstore/index.pb
@@ -1,3 +1,5 @@
 
 Q
-!src/Controller/HomeController.php,a\d\ad8b439416d1e02614f47c5b471c7c4e587dca82
\ No newline at end of file
+!src/Controller/HomeController.php,a\d\ad8b439416d1e02614f47c5b471c7c4e587dca82
+H
+templates/home.html.twig,3\8\38ac5fc300d52f94b369e87fbb1937abe29f831f
\ No newline at end of file
diff --git a/src/Controller/HomeController.php b/src/Controller/HomeController.php
index 455f3e5958c6b759a20685aefcf60cc135a9cf82..ce5e43e9d94c60bbf5f8e35fab910dfcba1f0890 100644
--- a/src/Controller/HomeController.php
+++ b/src/Controller/HomeController.php
@@ -8,19 +8,46 @@ use Symfony\Component\Routing\Attribute\Route;
 
 class HomeController extends AbstractController
 {
-    private function uniqElements(array $array): array {
-        return array_unique($array, SORT_REGULAR);
+    private function prepareMenu(array $aMenu): array {
+        $result = [];
+        foreach ($aMenu as $arr) {
+            if ($arr['depth'] === 0) {
+                $result[] = array(
+                    'name' => $arr['name'],
+                    'depth' => $arr['depth'],
+                    'submenu' => []
+                );
+                continue;
+            }
+            $result[array_key_last($result)]['submenu'][] = array(
+                'name' => $arr['name'],
+                'depth' => $arr['depth'],
+            );
+        }
+        return $result;
     }
 
+
     #[Route('/', name: 'home')]
     public function home(): Response
     {
-        $arr = [
-            ['laravel', 'php'],
-            ['codeigniter', 'php'],
-            ['laravel', 'php'],
-            ['c++', 'java'],
+        $aMenu = [
+            ['name' => 'Смартфоны и гаджеты','depth' => 0,],
+            ['name' => 'Смартфоны, мобильные телефоны','depth' => 1,],
+            ['name' => 'Планшеты','depth' => 1,],
+            ['name' => 'Наушники и гарнитуры','depth' => 1,],
+            ['name' => 'Компьютеры и ноутбуки','depth' => 0,],
+            ['name' => 'Ноутбуки и аксессуары','depth' => 1,],
+            ['name' => 'Компьютеры и мониторы','depth' => 1,],
+            ['name' => 'Компьютерные комплектующие','depth' => 1,],
+            ['name' => 'Техника для дома','depth' => 0,],
+            ['name' => 'Техника для уборки','depth' => 1,],
+            ['name' => 'Товары для ухода за одеждой','depth' => 1,],
+            ['name' => 'Аксессуары для техники','depth' => 1,],
+            ['name' => 'Товары для дома и кухни','depth' => 0,],
+            ['name' => 'Посуда','depth' => 1,],
         ];
-        return $this->json($this->uniqElements($arr));
+
+        return $this->render('home.html.twig', ['menu' => $this->prepareMenu($aMenu)]);
     }
 }
diff --git a/templates/home.html.twig b/templates/home.html.twig
index 60456d99db53f4677fae8ee380f7050ccf1853fb..9baaf00b56202c0678d0032d0311ab647a9fe3a5 100644
--- a/templates/home.html.twig
+++ b/templates/home.html.twig
@@ -1,12 +1,12 @@
 {% block body %}
-    <h1>Сортировка массива:</h1>
-    <form method="POST">
-        {{ dump(array) }}
-        {% for key1, value1 in array %}
-            {% for key2, value2 in value1 %}
-                <input type="hidden" name="array[][]" value="{{ value2 }}">
+    <ul>
+    {% for value in menu %}
+        {% if value.depth == 0 %}
+            <h2>{{ value.name }}</h2>
+            {% for val in value.submenu %}
+                <li>{{ val.name }}</li>
             {% endfor %}
-        {% endfor %}
-        <button type="submit">Отправить массив</button>
-    </form>
+        {% endif %}
+    {% endfor %}
+    </ul>
 {% endblock %}
\ No newline at end of file