@extends('layouts.app') @section('title', ($paymentMethod->label ?? 'Payment Method') . ' — Details') @push('styles') @endpush @section('content')

Payment Method

@php $typeIcon = match($paymentMethod->type) { 'card' => 'fa-credit-card', 'crypto_wallet' => 'fa-wallet', default => 'fa-university', }; $typeLabel = match($paymentMethod->type) { 'card' => 'Card', 'crypto_wallet' => 'Crypto Wallet', default => 'Bank Account', }; @endphp
Label {{ $paymentMethod->label }}
Type {{ $typeLabel }}
Default @if($paymentMethod->is_default) Default @else No @endif
Added {{ $paymentMethod->created_at ? $paymentMethod->created_at->format('M d, Y') : '—' }}

Details

@php $details = $paymentMethod->details; if (is_string($details)) $details = json_decode($details, true); $details = $details ?? []; @endphp @forelse($details as $key => $value)
{{ ucwords(str_replace('_', ' ', $key)) }} {{ $value }}
@empty

No additional details.

@endforelse
@unless($paymentMethod->is_default)
@csrf @method('PUT')
@endunless
@csrf @method('DELETE')
@endsection