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']); }