@extends('admin.layouts.app') @section('title') Order List | Admin @endsection @section('content')

@switch($status) @case('pending') Pending @break @case('confirm') Confirmed @break @case('ongoing') Ongoing @break @case('recived') Recived @break @case('cancel') Cancelled @break @default @endswitch Order Report From {{ \Carbon\Carbon::parse($date1)->format('d-m-Y') }} to {{ \Carbon\Carbon::parse($date2)->format('d-m-Y') }}

@csrf
@php $total = 0; $qty = 0; @endphp @foreach ($orders as $key => $order) {{-- @php $total += ($details->price * $details->quqntity); $qty += $details->quqntity; @endphp --}} @endforeach {{-- @foreach ($order->order_details as $key => $details) @php $total += ($details->price * $details->quqntity); $qty += $details->quqntity; @endphp @endforeach --}}
SL Date Order Id Customer Mobile No. Amount Status Action
{{ $key + 1 }} {{ $order->created_at->format('d-m-Y (h:i a)') }} {{ $order->unique_id }} @if ($order->shipping) {{ $order->shipping->name }} @endif @if ($order->shipping) {{ $order->shipping->phone }} @endif {{ $order->total }} {{ $order->status }} invoice

Total Amount: {{ $totalcollection }}

@endsection @section('style') @endsection @section('script') @endsection