@extends('platform.layout') @section('title', 'Payment accounts') @section('content')

Payment accounts

Where shops pay their subscription. They see these on their Billing page, in this order.

@if($errors->any())
{{ $errors->first() }}
@endif
@foreach($accounts as $key => $account) @php $type = $account['type'] ?? (str_contains($key, 'airtel') ? 'airtel' : (str_contains($key, 'bank') ? 'bank' : 'mobile')); $color = $account['color'] ?? $types[$type][2]; @endphp
{{ $account['label'] }}
{{ $account['number'] }}
{{ $account['name'] ?? '' }}{{ !empty($account['note']) ? ' ยท ' . $account['note'] : '' }}
@if($used[$key] ?? 0)
{{ $used[$key] }} {{ $used[$key] == 1 ? 'proof' : 'proofs' }} of payment sent to it
@endif
@csrf @method('DELETE')
Edit
@csrf @method('PUT') @include('platform._account_fields', ['account' => $account + ['type' => $type], 'id' => $key])
@endforeach

Add an account

@csrf @include('platform._account_fields', ['account' => ['type' => old('type', 'mobile'), 'label' => old('label'), 'number' => old('number'), 'name' => old('name'), 'note' => old('note')], 'id' => 'new'])
@endsection