@php
$freePlanDetails = getFreePlan();
$freePlanStructure = getConfigFreePlan();
$paidPlans = getPaidPlans();
$planStructure = getConfigPaidPlans();
@endphp
@if ($freePlanDetails['enabled'])
/month
+ WhatsApp Cloud Messaging Charges
@foreach ($freePlanStructure['features'] as $featureKey => $featureValue)
@php
$configFeatureValue = $featureValue;
$featureValue = $freePlanDetails['features'][$featureKey];
@endphp
-
@if (isset($featureValue['type']) and ($featureValue['type'] == 'switch'))
@if (isset($featureValue['limit']) and $featureValue['limit'])
@else
@endif
@else
@endif
@if (isset($featureValue['type']) and $featureValue['type'] == 'switch')
{{ $configFeatureValue['description'] }}
@else
@if (isset($featureValue['limit']) and $featureValue['limit'] < 0)
{{ __tr('Unlimited') }}
@elseif(isset($featureValue['limit']))
{{ __tr($featureValue['limit']) }}
@endif
{{ $configFeatureValue['description'] }}
{{ $configFeatureValue['limit_duration_title'] ?? '' }}
@endif
@endforeach
@endif
@foreach ($planStructure as $planKey => $plan)
@php
$planId = $plan['id'];
$features = $plan['features'];
$savedPlan = $paidPlans[$planKey];
$charges = $savedPlan['charges'];
if (!$savedPlan['enabled']) {
continue;
}
$monthlyCharge = null;
foreach ($charges as $itemKey => $itemValue) {
if ($itemValue['enabled'] && strpos(strtolower(Arr::get($plan['charges'][$itemKey], 'title', '')), 'month') !== false) {
$monthlyCharge = $itemValue['charge'];
break;
}
}
if ($monthlyCharge === null) {
continue;
}
@endphp
{{ $savedPlan['title'] ?? $plan['title'] }}
{{ formatAmount($monthlyCharge, true, true) }}
/month
+ WhatsApp Cloud Messaging Charges
@foreach ($plan['features'] as $featureKey => $featureValue)
@php
$configFeatureValue = $featureValue;
$featureValue = $savedPlan['features'][$featureKey];
@endphp
-
@if (isset($featureValue['type']) and ($featureValue['type'] == 'switch'))
@if (isset($featureValue['limit']) and $featureValue['limit'])
@else
@endif
@else
@endif
@if (isset($featureValue['type']) and $featureValue['type'] == 'switch')
{{ $configFeatureValue['description'] }}
@else
@if (isset($featureValue['limit']) and $featureValue['limit'] < 0)
{{ __tr('Unlimited') }}
@elseif(isset($featureValue['limit']))
{{ __tr($featureValue['limit']) }}
@endif
{{ $configFeatureValue['description'] }}
{{ $configFeatureValue['limit_duration_title'] ?? '' }}
@endif
@endforeach
@endforeach