diff --git a/source/pricing.blade.php b/source/pricing.blade.php index e49d90af..e99f762f 100644 --- a/source/pricing.blade.php +++ b/source/pricing.blade.php @@ -57,6 +57,13 @@ class="ud-single-pricing first-item{{ $content->isActive ? ' active' : ''}} wow
+ @php + $comparePlans = array_map(static fn ($planName) => [ + 'key' => strtolower($planName), + 'label' => $planName, + ], array_keys((array) $page->prices)); + @endphp +

{{ $page->t('Compare plans')}}

@@ -65,20 +72,22 @@ class="ud-single-pricing first-item{{ $content->isActive ? ' active' : ''}} wow - {{ $page->t('Basic') }} - {{ $page->t('Business') }} + @foreach ($comparePlans as $plan) + {{ $page->t($plan['label']) }} + @endforeach @foreach($page->optionsServicesLibresign as $item => $optionList) {{ $page->t($optionList->service) }} - @foreach (['basic', 'business'] as $item) + @foreach ($comparePlans as $plan) + @php($planValue = $optionList->{$plan['key']} ?? null) - @if (is_bool($optionList->$item)) - - @else - {{ $page->t($optionList->$item) }} + @if (is_bool($planValue)) + + @elseif (is_string($planValue) && $planValue !== '') + {{ $page->t($planValue) }} @endif @endforeach