MicroFrameWork/kernel/widgets/MenuWidget.php

17 lines
300 B
PHP
Raw Normal View History

2024-08-30 12:27:46 +03:00
<?php
namespace kernel\widgets;
use kernel\models\Menu;
use kernel\Widget;
class MenuWidget extends Widget
{
public function run(): void
{
2024-09-24 14:57:25 +03:00
$menu = Menu::where("parent_id", 0)->get()->sortBy("priority");
2024-08-30 12:27:46 +03:00
$this->cgView->render('/admin/menu.php', ['menu' => $menu]);
}
}