MicroFrameWork/kernel/widgets/MenuWidget.php

17 lines
280 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
{
$menu = Menu::where("parent_id", 0)->get();
$this->cgView->render('/admin/menu.php', ['menu' => $menu]);
}
}