@extends('layouts.dashboard') @section('title', 'Subscription') @section('content') {{-- Account status --}} @php $active = (bool) $subscription; @endphp

Account status

@if($active)

{{ $subscription->plan->name }} — {{ ucfirst($subscription->billing_cycle) }}, expires {{ $subscription->ends_at?->format('M j, Y') }}

@else

Submit a plan payment below. Your account activates once an admin verifies it.

@endif
@if($active) Active @else Inactive — pending approval @endif
@if($pending->isNotEmpty())

Pending payments

@foreach($pending as $req)
{{ $req->plan->name }} ({{ ucfirst($req->billing_cycle) }}) — ${{ rtrim(rtrim(number_format($req->amount,2),'0'),'.') }} Awaiting approval
@endforeach
@endif
{{-- Submit payment form --}}

{{ $active ? 'Change / renew plan' : 'Activate your account' }}

@php $payInstructions = setting('payment.instructions'); @endphp @if($payInstructions)
{!! $payInstructions !!}
@endif
@csrf
@error('plan_id')

{{ $message }}

@enderror
@include('partials.payment-selector', ['methods' => $paymentMethods])
{{-- Plans reference --}}
@foreach($plans as $plan) @endforeach
@endsection