fix(menu): Tenant 모델의 active() 스코프 사용으로 수정

- Tenant::where('is_active', true) → Tenant::active()
- tenants 테이블에 is_active 컬럼이 없어 발생한 SQL 오류 수정

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2025-12-27 23:14:21 +09:00
parent a84fc9ab77
commit cfb6b3edc2

View File

@@ -1256,7 +1256,7 @@ public function createMenuForBoard(array $boardData): GlobalMenu|Menu|null
}
// 2. 모든 테넌트의 Menu에 추가
$tenants = Tenant::where('is_active', true)->get();
$tenants = Tenant::active()->get();
foreach ($tenants as $tenant) {
$menuParentId = $this->findParentMenuForBoard(false, $tenant->id);
$menuExists = Menu::where('url', $url)->where('tenant_id', $tenant->id)->exists();
@@ -1423,7 +1423,7 @@ public function restoreMenuForBoard(string $boardCode, string $boardName, bool $
}
// === 모든 활성 테넌트의 Menu 복원/생성 ===
$tenants = Tenant::where('is_active', true)->get();
$tenants = Tenant::active()->get();
foreach ($tenants as $tenant) {
$menuTrashed = Menu::onlyTrashed()->where('url', $url)->where('tenant_id', $tenant->id)->first();
if ($menuTrashed) {