From 54ebd5e0fde94191b610e590d95e2a1668d11c3b Mon Sep 17 00:00:00 2001 From: kent Date: Mon, 29 Dec 2025 17:31:09 +0900 Subject: [PATCH] =?UTF-8?q?fix(SAM/API):=20=EB=A9=94=EB=89=B4=20=EB=AA=A9?= =?UTF-8?q?=EB=A1=9D=20=EC=A1=B0=ED=9A=8C=20=EC=8B=9C=20is=5Factive=20?= =?UTF-8?q?=EA=B8=B0=EB=B3=B8=EA=B0=92=20true=20=EC=84=A4=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - GET /api/v1/menus에서 is_active 파라미터 없으면 기본값 1(활성)로 설정 - 비활성 메뉴 조회는 is_active=0 명시적으로 전달 필요 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- app/Services/MenuService.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/app/Services/MenuService.php b/app/Services/MenuService.php index f0bb962..00c8f01 100644 --- a/app/Services/MenuService.php +++ b/app/Services/MenuService.php @@ -47,9 +47,8 @@ public static function index(array $params) if (array_key_exists('parent_id', $params)) { $q->where('parent_id', $params['parent_id']); } - if (array_key_exists('is_active', $params)) { - $q->where('is_active', (int) $params['is_active']); - } + // is_active 기본값 true (파라미터 없으면 활성화된 메뉴만) + $q->where('is_active', (int) ($params['is_active'] ?? 1)); if (array_key_exists('hidden', $params)) { $q->where('hidden', (int) $params['hidden']); }