@extends('layouts.app') @section('content')

Plans & License

Manage your subscription and billing

@php $isExpired = auth()->user()->plan_expire_date && auth()->user()->plan_expire_date->isPast(); $hasLastPlan = !empty(auth()->user()->last_plan); $showCurrentPlan = $currentPlan && (!$isExpired || ($isExpired && $hasLastPlan)); @endphp

Current Plan

@if($currentPlan && !$isExpired) Active @elseif($currentPlan && $isExpired) Expired @else No Plan @endif
@if($showCurrentPlan)

{{ $currentPlan->name }}

{{ $currencySymbol }}{{ number_format($currentPlan->price, 0) }}

{{ $currentPlan->duration }}

@if($currentPlan->description)

{{ $currentPlan->description }}

@endif @if(auth()->user()->plan_expire_date)
{{ $isExpired ? 'Expired:' : 'Expires:' }} {{ auth()->user()->plan_expire_date->format('M d, Y') }}
@endif
{{ $currentPlan->max_customers }} Customers
PPPoE & Hotspot
Payment Gateways
@if($hasLastPlan)
@endif @else

No active plan

Choose a plan below to get started

@endif

Recent Orders

@if($orders->count() > 0)
@foreach($orders as $order) @endforeach
Order ID Plan Amount Status Date
#{{ $order->order_id }} {{ $order->plan_name }} {{ $currencySymbol }}{{ number_format($order->price, 0) }} @if($order->payment_status === 'completed') Completed @elseif($order->payment_status === 'pending') Pending @else Failed @endif {{ $order->created_at->format('M d, Y') }}
@else

No orders found

Your order history will appear here

@endif

Available Plans

@if($availablePlans->count() > 0)
@foreach($availablePlans as $plan)

{{ $plan->name }}

{{ $currencySymbol }}{{ number_format($plan->price, 0) }}

{{ $plan->duration }}

{{ $plan->max_customers }} Customers
PPPoE & Hotspot
Mobile Payments
Payment Gateways
@php $isExpired = auth()->user()->plan_expire_date && auth()->user()->plan_expire_date->isPast(); $hasLastPlan = !empty(auth()->user()->last_plan); @endphp @if($currentPlan && $currentPlan->id === $plan->id && !$isExpired) @elseif($currentPlan && !$isExpired && $hasLastPlan && $plan->price > $currentPlan->price) @elseif($currentPlan && !$isExpired && $hasLastPlan && $plan->price < $currentPlan->price) @else @endif
@endforeach
@else

No plans available

@endif

@if($lastPlan)

Renew Plan

Renew your current plan: {{ $lastPlan->name }}

Amount: {{ $currencySymbol }}{{ number_format($lastPlan->price, 0) }}

This will extend your current plan duration.

Add Extra Clients

Current limit: {{ $currentPlan->max_customers }} clients

Cost per additional client:

Total cost:

@endif
@endsection