<?php

namespace app\extra\service\system;

use app\extra\basic\Service;
use app\model\inmei\InmeiMenu;
use app\model\system\SystemMenu;

class MenuService extends Service
{

    /**
     * @param int $super
     * @param int $hide
     * @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();
    }

}