@php
$subscriptionPlanDays = collect(\App\Models\Plan::DURATION[$currentPlan->plan_frequency])->map(function ($value) {
return trans('messages.plan.' . $value);
})->implode(', ');
@endphp
{{ currencyFormat($currentPlan->plan_amount,2, $currentPlan->plan->currency->currency_code,) .'/ '.$subscriptionPlanDays }}
{{-- {{ $currentPlan->plan->currency->currency_icon.' '.number_format($currentPlan->plan_amount).'/ '.\App\Models\Plan::DURATION[$currentPlan->plan_frequency] }}--}}
@if(!empty($currentPlan->trial_ends_at))
@php
$startsAt = \Carbon\Carbon::now();
$totalDays = \Carbon\Carbon::parse($currentPlan->starts_at)->diffInDays($currentPlan->ends_at);
$usedDays = \Carbon\Carbon::parse($currentPlan->starts_at)->diffInDays($startsAt);
$remainingDays = $totalDays - $usedDays;
@endphp
@if($remainingDays > 0)
{{__('messages.plan.trial_days')}} : {{ $remainingDays.' '.__('messages.plan.days').' '.__('messages.subscription.remaining') }}
@endif
@endif
{{ __('messages.subscription.subscribed_date').': '.\Carbon\Carbon::parse($currentPlan->starts_at)->format('dS M, Y') }}
@foreach(getPlanFeature($currentPlan->plan) as $feature => $value)
@if($value)
{{ __('messages.feature.'.$feature) }}
@endif
@endforeach