@php $planRanks = ['monthly' => 1, '6_months' => 2, 'yearly' => 3]; $currentRank = $currentPlan ? ($planRanks[$currentPlan->ref] ?? 0) : 0; $selectedRank = $planRanks[$planRef] ?? 0; @endphp @if($currentPlan && $currentPlan->ref === $planRef) @elseif($currentRank > $selectedRank) @else
@endif