priority menu item

This commit is contained in:
2024-09-24 14:57:25 +03:00
parent a48088581f
commit cb2c719b1b
12 changed files with 29 additions and 14 deletions

View File

@ -10,7 +10,7 @@ class MenuWidget extends Widget
public function run(): void
{
$menu = Menu::where("parent_id", 0)->get();
$menu = Menu::where("parent_id", 0)->get()->sortBy("priority");
$this->cgView->render('/admin/menu.php', ['menu' => $menu]);
}