@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') . ' ' . localized_date($currentPlan->ends_at, 'dS M, Y') }} @else {{ __('messages.subscription.active_until') . ' ' . localized_date($currentPlan->ends_at, 'dS M, Y') }} @endif
@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') . ': ' . localized_date($currentPlan->starts_at, 'dS M Y') }}
@foreach (getPlanFeature($currentPlan->plan) as $feature => $value) @if ($value) {{ __('messages.feature.' . $feature) }} @endif @endforeach
@endsection