| 123456789101112131415161718192021222324252627 |
- <?php
- namespace app\extra\service\system;
- use app\extra\basic\Service;
- use app\model\system\SystemMenu;
- class MenuService extends Service
- {
- /**
- * @param int $super
- * @param int $type
- * @return array
- */
- public function getMenuList(int $super = 0,int $hide = 0,int $type = 1): array
- {
- $model = new SystemMenu();
- try {
- $data = $model->where("status",1)->where("from",$type)->order("sort","asc")->select();
- } catch (\Throwable $throwable) {
- return [];
- }
- return $data->isEmpty()?[]:$data->toArray();
- }
- }
|