@if( !$plan->isFree() && ! $user->subscriptions()?->where('stripe_price', $plan->price_id)->first()->cancelled() )
@php
$plan_id = \Illuminate\Support\Facades\Crypt::encrypt( $plan->id );
@endphp
Cancel Plan
@endif
@if( !$plan->isFree() && $user->subscriptions()->where('stripe_price', $plan->price_id)->first()->cancelled() )
@php
$end_at = $user->subscription('main')->ends_at->format('dS M Y');
@endphp
Plan End Date: {{ $end_at }}
@php
$plan_id = \Illuminate\Support\Facades\Crypt::encrypt( $plan->id );
@endphp
Resume Plan
@endif