@extends('layouts.app') @section('content') @include('inc.h') @include('inc.s')

Paid Orders

{{-- --}} @php $totalEarned = 0; @endphp @foreach($orders as $order) @php $orderTotal = $order->price * $order->quantity; $totalEarned += $orderTotal; @endphp {{-- --}} @endforeach
Order ID Item Name Quantity Price (₦)Total Earned (₦)
{{ $order->id }} {{ $order->itemName }} {{ $order->quantity }} {{ $order->price }}{{ $orderTotal }}
{{--

Total Earnings: ₦{{ $totalEarned }}

--}} {{ $orders->links() }}
@endsection