@extends('layouts.yellow') @section('content')
@if($payments->isNotEmpty())
{{ __('view-payments.totalsByCurrency') }}
@php $groupedPayments = $payments->groupBy('currencies_id'); @endphp @foreach($groupedPayments as $currencyId => $currencyPayments) @php $currency = App\Models\Currencies::find($currencyId); if(!$currency) continue; $total = $currencyPayments->sum('amount'); @endphp
{{ $currency->title }}
{{ number_format($total, 2) }}
@endforeach
@endif
Payments illustration
@endsection