@extends('layouts.app') @section('title', 'Billing') @section('page-title', 'Billing & Subscription') @section('content')
Current Plan
{{ $currentSubscription?->plan?->name ?? 'No Plan' }}
@if($currentSubscription)
Expires: {{ $currentSubscription->expires_at?->format('M d, Y') ?? 'Never' }}
@endif
Status
{{ $currentSubscription?->status ?? 'Inactive' }}
Usage
{{ auth()->user()->monthlyMessageCount() }}
messages this month
Available Plans
@foreach($plans as $plan)
{{ $plan->name }}
${{ number_format($plan->price, 2) }}
/{{ $plan->billing_cycle }}
  • {{ $plan->device_limit }} Devices
  • {{ number_format($plan->message_limit) }} Messages/month
  • {{ number_format($plan->api_limit) }} API calls/month
@if($currentSubscription?->plan_id == $plan->id) @else
@csrf
@endif
@endforeach
@if($currentSubscription)
@csrf
@endif @if($payments->isNotEmpty())
Payment History
@foreach($payments as $payment) @endforeach
DatePlanAmountMethodStatus
{{ $payment->created_at->format('M d, Y') }} {{ $payment->plan?->name ?? '-' }} ${{ number_format($payment->amount, 2) }} {{ $payment->payment_method ?? '-' }} {{ $payment->status }}
@endif @endsection