@php use App\Enums\Subscription\SubscriptionPlanKeyEnum; use Illuminate\Support\Str; @endphp @extends('layouts.admin.app', ['page' => $menuAdmin['subscriptions']['active'] ?? '', 'sub_page' => $menuAdmin['subscriptions']['route']['plans']['sub_active'] ?? null]) @section('title', isset($plan) && ($plan->id ?? false) ? __('labels.edit') : __('labels.add') . ' ' . __('labels.subscription_plans')) @section('header_data') @php $page_title = __('labels.subscription_plans'); $page_pretitle = isset($plan) && ($plan->id ?? false) ? __('labels.edit') : __('labels.add'); @endphp @endsection @php $breadcrumbs = [ ['title' => __('labels.home'), 'url' => route('admin.dashboard')], ['title' => __('labels.subscription_plans'), 'url' => route('admin.subscription-plans.index')], ['title' => isset($plan) && ($plan->id ?? false) ? __('labels.edit') : __('labels.add'), 'url' => null], ]; @endphp @section('admin-content')

{{ isset($plan) && ($plan->id ?? false) ? __('labels.edit') : __('labels.add') }} {{ __('labels.subscription_plans') }}

@csrf
{{ $systemSettings['currencySymbol'] }}
@error('duration_type')
{{ $message }}
@enderror
@error('duration_days')
{{ $message }}
@enderror
{{ __('labels.switches') }}
{{ __('labels.plan_configurations') }} ({{ __('labels.leave_empty_unlimited') }})
@php $limitMap = isset($plan) && ($plan->id ?? false) && isset($plan->limits) ? $plan->limits->pluck('value', 'key')->toArray() : []; @endphp @foreach (SubscriptionPlanKeyEnum::values() as $key) @endforeach
{{ __('labels.key') }} {{ __('labels.value') }}
@if (SubscriptionPlanKeyEnum::isBoolean($key)) @else @endif
@push('scripts') @endpush @endsection