@php use Carbon\Carbon; @endphp
| {{ __('Plan') }} | {{ __('Price & Connects') }} | {{ __('Gateway') }} | {{ __('Payment') }} | {{ __('Status') }} | {{ __('Dates') }} |
|---|---|---|---|---|---|
|
{{ $sub->subscription?->subscription_type?->type ?? '—' }} @if($sub->subscription?->title){{ $sub->subscription->title }} @endif |
{{-- Price & Connects --}}
{{ float_amount_with_currency_symbol($sub->price) }} {{ $sub->limit }} {{ __('connects') }} |
{{-- Gateway --}}
@if($sub->payment_gateway == 'manual_payment') {{ __('Manual Payment') }} @elseif($sub->payment_gateway == 'authorize_dot_net') {{ __('Authorize.Net') }} @else {{ ucfirst(str_replace('_', ' ', $sub->payment_gateway)) }} @endif |
{{-- Payment Status --}}
@php $ps = $sub->payment_status; if ($ps === 'complete') { [$psBg, $psText] = ['rgba(var(--main-color-one-rgb), 0.1)', 'var(--main-color-one)']; } elseif ($ps === 'pending') { [$psBg, $psText] = ['#FFF4EC', '#FA8C00']; } elseif ($ps === 'cancel' || $ps === '' || $ps === null) { [$psBg, $psText] = ['#FFF1F4', '#F0416C']; } else { [$psBg, $psText] = ['#F8F9FB', '#637381']; } @endphp {{ ($ps === '' || $ps === 'cancel' || $ps === null) ? __('Cancelled') : ucfirst($ps) }} | {{-- Status --}}@php if ($sub->status == 0) { [$stBg, $stText, $stLabel] = ['#FFF1F4', '#F0416C', __('Inactive')]; } elseif (Carbon::parse($sub->expire_date)->gt(Carbon::now())) { [$stBg, $stText, $stLabel] = ['rgba(var(--main-color-one-rgb), 0.1)', 'var(--main-color-one)', __('Active')]; } else { [$stBg, $stText, $stLabel] = ['#FFF4EC', '#FA8C00', __('Expired')]; } @endphp {{ $stLabel }} | {{-- Dates --}}
{{ __('Purchased:') }} {{ $sub->created_at->format('d M Y') }} {{ __('Expires:') }} {{ Carbon::parse($sub->expire_date)->format('d M Y') }} |
|
{{ __('No subscription history found') }} {{ __('Buy a subscription plan') }} |
|||||