@extends('layouts.dashboard') @section('meta') {{ config('app.name') }} - Donations @endsection @section('title') Donations @endsection @section('form') @php $user = auth()->user(); @endphp
Donations
{{-- Message Display--}} @if (session('success'))
{{ session('success') }}
@elseif (session('fail'))
{{ session('fail') }}
@endif
@foreach ($user->subscriptions->sortByDesc('created_at') as $subscription)
Referencing code: {{ $subscription->name }}
Donating ${{ $subscription->getTotal() }} {{ $subscription->getInterval() }}
Started at: {{ $subscription->created_at->format('M d, Y') }}
@if ($subscription->ends_at)
Ended at: {{ Carbon\Carbon::parse($subscription->ends_at)->format('M d, Y') }}
@endif
Next billing date: {{ ($date = $subscription->getInvoiceDate()) == 'N/A' ? $date : $date->format('M d, Y') }}
@if (!$subscription->ends_at) @endif

@endforeach
@endsection @section('scripts') @if (config('app.debug')) @else @endif {{-- --}} @endsection