{{-- * LaraClassifier - Classified Ads Web Application * Copyright (c) BeDigit. All Rights Reserved * * Website: https://laraclassifier.com * * LICENSE * ------- * This software is furnished under a license and may be used and copied * only in accordance with the terms of such license and with the inclusion * of the above copyright notice. If you Purchased from CodeCanyon, * Please read the full License from here - http://codecanyon.net/licenses/standard --}} @extends('layouts.master') @php $currentUrl = request()->url(); $allAccPerms = config('larapen.core.SpacialPermissions', []); $iCurAccT = data_get($user, 'acctType'); $currentPrice = data_get($iCurAccT, 'p_type.price', 0); // Find all higher priced plans for upgrade $upgradablePlans = collect($account_types)->filter(fn($plan) => data_get($plan, 'p_type.price', 0) > $currentPrice); @endphp @php if (!function_exists('subscriptionStatusClass')) { function subscriptionStatusClass($status) { return match ($status) { 'active' => 'success', 'pending', 'in_progress' => 'warning', 'trial' => 'info', 'suspended' => 'secondary', 'cancelled' => 'danger', 'expired' => 'dark', 'failed' => 'danger', default => 'secondary', }; } } @endphp @section('content') @includeFirst([config('larapen.core.customizedViewPath') . 'common.spacer', 'common.spacer'])
{{-- Sidebar --}}
@includeFirst([ config('larapen.core.customizedViewPath') . 'account.inc.sidebar', 'account.inc.sidebar', ])
{{-- Main Content --}}
@include('flash::message') @if (isset($errors) && $errors->any())
{{ t('oops_an_error_has_occurred') }}
    @foreach ($errors->all() as $error)
  • {{ $error }}
  • @endforeach
@endif {{-- Current Account Type --}}

{{ data_get($iCurAccT, 'name', '') }}

This Account Has Following Permissions:
    @foreach (data_get($iCurAccT, 'p_type.description_array', []) as $option)
  • - {!! $option !!}
  • @endforeach @foreach (data_get($iCurAccT, 'permissions', []) as $permission)
  • - {!! data_get($permission, 'display_name') !!}
  • @endforeach
{{-- Current Subscription --}} @if (!empty($subscription))
{{-- Main Info & Actions --}}
{{-- Left Side: Plan Details --}}

{{ $subscription->plan_name ?? 'N/A' }}

{{ str_replace('_', ' ', ucfirst($subscription->status)) }}

Renews on {{ \Carbon\Carbon::parse($subscription->next_billing_date)->format('M d, Y') }} @if (!empty($daysLeft)) ({{ $daysLeft }} days left) @endif

{{-- Right Side: Price & Cancel Button --}}
Amount

{{ $subscription->currency }} {{ number_format($subscription->amount, 2) }}


{{-- Footer Details --}}
Started on {{ \Carbon\Carbon::parse($subscription->start_date)->format('M d, Y') }}
Billed via {{ ucfirst($subscription->gateway_name) }}
ID: {{ $subscription->gateway_subscription_id }}
@endif {{-- Change Account Type Button --}} @if (empty($subscription)) Upgrade Account @endif {{-- Subscription History --}} @if ($subscriptionHistory->isNotEmpty())
Subscription History

View all your past and current subscriptions

@foreach ($subscriptionHistory as $sub) @endforeach @if ($subscriptionHistory->hasPages()) @endif
Subscription Status Amount Actions
{{-- Display plan name and upgrades --}} {{ $sub->plan_name }} @if ($sub->replacedBy) → {{ $sub->replacedBy->plan_name }} @endif
{{ \Carbon\Carbon::parse($sub->start_date)->format('M d, Y') }} @if ($sub->status === 'cancelled' && $sub->end_date) | End: {{ \Carbon\Carbon::parse($sub->end_date)->format('M d, Y') }} @elseif($sub->next_billing_date) | Next: {{ \Carbon\Carbon::parse($sub->next_billing_date)->format('M d, Y') }} @endif
@if ($sub->replaced_by_id) Updated @else {{ str_replace('_', ' ', ucfirst($sub->status)) }} @endif {{ $sub->currency }} {{ number_format($sub->amount, 2) }}
@php $p = $subscriptionHistory; $current = $p->currentPage(); $last = $p->lastPage(); $start = max(1, $current - 2); $end = min($last, $current + 2); @endphp
@endif
@endsection @section('after_styles') @section('after_scripts') @endsection