@extends('frontend.layouts.user.index') @section('title', __('Checkout — :plan', ['plan' => $plan->name])) @push('styles') @endpush @section('content') @php use App\Enums\BillingCycle; $isUpgrade = $isSwitch && (int) $plan->sort_order > (int) $current->plan->sort_order; $isDowngrade = $isSwitch && (int) $plan->sort_order < (int) $current->plan->sort_order; $headingTitle = match (true) { $isUpgrade => __('Upgrade to :plan', ['plan' => $plan->name]), $isDowngrade => __('Switch to :plan', ['plan' => $plan->name]), $isSwitch => __('Change billing cycle'), default => __('Subscribe to :plan', ['plan' => $plan->name]), }; $headingSub = match (true) { $isUpgrade => __('Unlock more features. We will only charge the prorated difference.'), $isDowngrade => __('Switch to a smaller plan. Unused time on your current plan is credited.'), $isSwitch => __('Adjust your billing cycle. Unused time is applied as credit.'), default => __('Confirm your details and pay from your wallet to activate.'), }; $planIcon = match (true) { $plan->isFree() => 'fas fa-seedling', $plan->is_featured => 'fas fa-crown', default => 'fas fa-rocket', }; @endphp
{{ $plan->description ?: __('Premium plan with full feature access.') }}