@extends('layouts.customer') @section('content')
@if ($message = Session::get('error'))

{{ $message }}

@endif
@if ($message = Session::get('success'))

{{ $message }}

@endif
@if($plan)

{{ $plan->title}}

${{$plan->amount}} / {{ $plan->duration }}

@if( !$plan->isFree() && $active_subs = $user->subscriptions()?->active()->first() ) {{ 'Plan Start Date:'. $active_subs->created_at->format('dS M Y') }} @endif
@if( !$plan->isFree() && ! $user->subscriptions()?->where('stripe_price', $plan->price_id)->first()->cancelled() ) @php $plan_id = \Illuminate\Support\Facades\Crypt::encrypt( $plan->id ); @endphp Cancel Plan
@csrf
@endif @if( !$plan->isFree() && $user->subscriptions()->where('stripe_price', $plan->price_id)->first()->cancelled() )
@php $end_at = $user->subscription('main')->ends_at->format('dS M Y'); @endphp Plan End Date: {{ $end_at }}
@php $plan_id = \Illuminate\Support\Facades\Crypt::encrypt( $plan->id ); @endphp Resume Plan
@csrf
@endif
@endif @if(! $plan->isFree())

Invoices

@if($invoices) @php $i = 0; @endphp @foreach($invoices as $invoice) @endforeach @else

No records found!

@endif
Sr No Customer Email Payment Status Total Amount Action
{{ ++$i }} {{ $invoice->customer_email }} {{ $invoice->status }} {{ $invoice->total }}
@endif
@endsection