@php use App\Core\Platform\AiPlanDefaults; $planDefinitions = $planDefinitions ?? []; $plans = $plans ?? collect(); $availableModels = AiPlanDefaults::availableModels(); $availableImageModels = $availableImageModels ?? collect(); @endphp
@csrf @if (session('status')) {{ session('status') }} @endif 플랜 {{ count($planDefinitions) }} 저장
@foreach ($planDefinitions as $planKey => $definition) @php $plan = $plans->get($planKey); $planLabel = old("plans.$planKey.label", $plan?->label ?? $definition['label']); $planDescription = old("plans.$planKey.description", $plan?->description ?? $definition['description']); $aiEnabled = old("plans.$planKey.ai_enabled", $plan?->ai_enabled ?? $definition['ai_enabled']); $monthlyAiCredit = old("plans.$planKey.monthly_ai_credit", $plan?->monthly_ai_credit ?? $definition['monthly_ai_credit']); $currentModels = $plan?->effectiveAllowedModels() ?: $definition['allowed_models']; $selectedModels = old("plans.$planKey.allowed_models", $currentModels); $selectedModels = is_array($selectedModels) ? $selectedModels : AiPlanDefaults::normalizeAllowedModels($selectedModels); $imageEnabled = old("plans.$planKey.ai_image_enabled", $plan?->ai_image_enabled ?? $definition['ai_image_enabled']); $currentImageModelIds = $plan?->effectiveAllowedImageModelIds() ?: $definition['allowed_image_model_ids']; $selectedImageModelIds = old("plans.$planKey.allowed_image_model_ids", $currentImageModelIds); $selectedImageModelIds = is_array($selectedImageModelIds) ? array_map('intval', $selectedImageModelIds) : []; $defaultImageModelId = old("plans.$planKey.default_image_model_id", $plan?->default_image_model_id ?? $definition['default_image_model_id']); $effectiveAiCredit = $plan?->monthly_ai_credit ?? $definition['monthly_ai_credit']; $formattedAiCredit = AiPlanDefaults::formatCredits(is_null($effectiveAiCredit) ? null : (int) $effectiveAiCredit); @endphp
Plan {{ $planKey }}
AI {{ $aiEnabled ? 'O' : 'X' }} {{ $formattedAiCredit }}

{{ $planLabel }}

{{ $planDescription }}

{{ $planDescription }}
AI 사용 허용
이 플랜에서 AI 글쓰기를 허용
허용 모델

허용할 모델을 체크박스로 선택합니다.

@foreach ($availableModels as $model) {{ $model }} @endforeach
AI 이미지 사용 허용
이 플랜에서 AI 이미지 생성을 허용

활성화하면 이 플랜의 허용 이미지 모델과 기본 모델을 사용할 수 있습니다.

허용 이미지 모델

활성화된 이미지 모델만 선택할 수 있습니다.

@if ($availableImageModels->isEmpty())
먼저 플랫폼 AI Credit 화면에서 이미지 모델을 등록하세요.
@else
@foreach ($availableImageModels as $imageModel) {{ $imageModel->displayName() }} @endforeach
기본 이미지 모델

플랜 기본값이 없으면 플랫폼 기본 이미지 모델을 사용합니다.

@endif
@endforeach
저장