@extends('layouts.app') @section('title') {{__('messages.subscription.manage_subscription')}} @endsection @section('content')
@include('flash::message') @include('layouts.errors')

{!! $currentPlan->plan->name !!}

{{ __('messages.plan.no_of_vcards').': '.$currentPlan->no_of_vcards }}

@if( \Carbon\Carbon::now() > $currentPlan->ends_at) {{ __('messages.subscription.expired').' '.\Carbon\Carbon::parse($currentPlan->ends_at)->format('dS M, Y') }} @else {{ __('messages.subscription.active_until').' '.\Carbon\Carbon::parse($currentPlan->ends_at)->format('dS M, Y') }} @endif
{{ currencyFormat($currentPlan->plan_amount,2, $currentPlan->plan->currency->currency_code,) .'/ '.\App\Models\Plan::DURATION[$currentPlan->plan_frequency] }} {{-- {{ $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
@endsection