fix(plan-cache): update nested property access after migrating cache from object list to array list

This commit is contained in:
idevakk
2025-11-17 10:43:57 -08:00
parent 23cfd0c88d
commit f60c986e07

View File

@@ -9,20 +9,20 @@
@foreach($plans as $plan) @foreach($plans as $plan)
<div class="rounded-2xl border dark:border-white/[0.1] border-black/[0.3] p-6 shadow-xs ring-1 ring-white/[0.5] sm:px-8 lg:p-12"> <div class="rounded-2xl border dark:border-white/[0.1] border-black/[0.3] p-6 shadow-xs ring-1 ring-white/[0.5] sm:px-8 lg:p-12">
<div class="text-center"> <div class="text-center">
<h2 class="text-lg font-medium text-gray-900 dark:text-gray-400">{{ $plan->name }} @if(!$plan->monthly_billing) <h2 class="text-lg font-medium text-gray-900 dark:text-gray-400">{{ $plan['name'] }} @if(!$plan['monthly_billing'])
<flux:badge variant="solid" size="sm" color="emerald">2 Months Free</flux:badge> <flux:badge variant="solid" size="sm" color="emerald">2 Months Free</flux:badge>
@endif</h2> @endif</h2>
<p class="mt-2 sm:mt-4"> <p class="mt-2 sm:mt-4">
<strong class="text-3xl font-bold text-gray-900 dark:text-gray-200 sm:text-4xl">${{ $plan->price }}</strong> <strong class="text-3xl font-bold text-gray-900 dark:text-gray-200 sm:text-4xl">${{ $plan['price'] }}</strong>
<span class="text-sm font-medium text-gray-700 dark:text-gray-400">/{{ $plan->monthly_billing ? 'month' : 'year' }}</span> <span class="text-sm font-medium text-gray-700 dark:text-gray-400">/{{ $plan['monthly_billing'] ? 'month' : 'year' }}</span>
</p> </p>
</div> </div>
<ul class="mt-6 space-y-2"> <ul class="mt-6 space-y-2">
@if($plan->details) @if($plan['details'])
@forelse ($plan->details as $key => $value) @forelse ($plan['details'] as $key => $value)
@if ($value) @if ($value)
<li class="flex items-center gap-1"> <li class="flex items-center gap-1">
@if($value == "true")<flux:icon.check-circle /> @if($value == "true")<flux:icon.check-circle />
@@ -36,22 +36,22 @@
@endif @endif
</ul> </ul>
@if($plan->accept_stripe && $plan->pricing_id !== null) @if($plan['accept_stripe'] && $plan['pricing_id'] !== null)
<flux:button variant="primary" class="w-full mt-6 cursor-pointer" wire:click="choosePlan('{{ $plan->pricing_id }}')"> <flux:button variant="primary" class="w-full mt-6 cursor-pointer" wire:click="choosePlan('{{ $plan['pricing_id'] }}')">
Pay with card Pay with card
</flux:button> </flux:button>
@endif @endif
@if($plan->accept_shoppy && $plan->shoppy_product_id !== null) @if($plan['accept_shoppy'] && $plan['shoppy_product_id'] !== null)
<flux:button variant="filled" class="w-full mt-2 cursor-pointer" data-shoppy-product="{{ $plan->shoppy_product_id }}"> <flux:button variant="filled" class="w-full mt-2 cursor-pointer" data-shoppy-product="{{ $plan['shoppy_product_id'] }}">
Pay with crypto Pay with crypto
</flux:button> </flux:button>
@endif @endif
@if($plan->accept_oxapay && $plan->oxapay_link !== null) @if($plan['accept_oxapay'] && $plan['oxapay_link'] !== null)
<flux:button <flux:button
variant="filled" variant="filled"
class="w-full mt-2 cursor-pointer" class="w-full mt-2 cursor-pointer"
tag="a" tag="a"
href="{{ $plan->oxapay_link }}" href="{{ $plan['oxapay_link'] }}"
target="_blank" target="_blank"
> >
Pay with crypto Pay with crypto