* * This source file is subject to the MIT license that is bundled * with this source code in the file LICENSE. */ declare(strict_types=1); namespace App\Controller; use App\Service\PermissionService; use Exception; use Hyperf\Di\Annotation\Inject; use Hyperf\HttpMessage\Server\Response; class SystemController extends AbstractController { #[Inject] protected PermissionService $permissionService; /** * 菜单列表 * @throws Exception */ public function menuList(): Response { $user = $this->user(); $menu = $this->permissionService->getMenuByUserType($user); return $this->apiResponse->success($menu); } }