@extends('layouts.shared.admin-data-listing') @section('title', 'Payments') @section('shortDesc', 'Made by customers') @section('filters')
Filter
@endsection @section('data') @if($payments->isEmpty())

{{'No recent payments found.'}}

@else
@foreach($payments as $payment) @endforeach
{{'Customer'}}
{{'Plan'}}
{{'Amount'}}
{{'Date'}}
{{'Status'}}
@php $initials = strtoupper(substr(($payment->user->name ?? 'User'), 0, 1)); @endphp
{{ $initials }}
{{ $payment->user->name }}
{{ $payment->user->email }}
@if($payment->subscription) {{ $payment->subscription->plan->name }} @else {{ 'Resource Purchase' }} @endif {{ number_format($payment->amount, 2) }} {{ $payment->created_at->format('M d, Y') }} @if($payment->status == 'completed') {{'Success'}} @elseif($payment->status == 'pending') {{'Pending'}} @elseif($payment->status == 'failed') {{'Failed'}} @endif
@endif @endsection