@extends('layouts.billing') @section('title', __('billing.ChooseAPlan')) @section('content')

{{ __('billing.ChooseYourPlan') }}

{{ __('billing.PlanSubtitle') }}

{{-- Billing toggle --}}
@if($subscription && $subscription->isActive())
{{ __('billing.YoureOnPlan', ['plan' => $subscription->plan->name ?? 'N/A', 'cycle' => ucfirst($subscription->billing_cycle)]) }} @if($subscription->ends_at) {{ __('billing.Renews') }} {{ $subscription->ends_at->format('M d, Y') }}. @endif
@endif
@foreach($plans as $plan)
@if($subscription && $subscription->plan_id === $plan->id && $subscription->isActive())
{{ __('billing.Current') }}
@endif

{{ $plan->name }}

{{ $plan->slug }}

{{-- Monthly price --}}
{{ $currencySymbol }}{{ number_format($plan->price, 2) }} /{{ __('billing.Month') }}
{{-- Yearly price --}}
{{ $currencySymbol }}{{ number_format($plan->getPriceForCycle('yearly'), 2) }} /{{ __('billing.Year') }} @if($plan->getYearlySavingsPercent() > 0) {{ __('billing.SavePercent', ['percent' => $plan->getYearlySavingsPercent()]) }} @endif

{{-- Limits --}}
@foreach($plan->getFormattedLimits() as $key => $limit)
{{ $limit['display'] }} {{ $limit['label'] }}
@endforeach
{{-- Features --}} @php $activeFeatures = $plan->getActiveFeatures(); @endphp @if(count($activeFeatures) > 0)
@foreach($activeFeatures as $key => $feature)
{{ $feature['label'] }}
@endforeach
@endif {{-- All available features not in this plan --}} @php $missingFeatures = array_diff_key(\App\Models\Central\Plan::AVAILABLE_FEATURES, $activeFeatures); @endphp @if(count($missingFeatures) > 0)
@foreach($missingFeatures as $key => $feature)
{{ $feature['label'] }}
@endforeach
@endif
@endforeach
@push('scripts') @endpush @endsection