@extends('admin.layouts.app') @section('title', 'Area Report') @section('content')

Area Report

{!! Form::open(['route' => ['admin.area.report'], 'id' => 'filter_form']) !!} {!! Form::hidden('governorate_id', $governorate_id,array('id' => 'governorate_id')) !!} {!! Form::hidden('area_id', $area_id,array('id' => 'area_id')) !!}
{!! Form::label('governorate', __('Governorate')) !!} {{ Form::select('governorate', $governorates, $governorate_id, ['id'=>'governorate','class' => 'form-control','placeholder' => 'Select Governorate']) }}
{!! Form::label('area', __('Area')) !!} {{ Form::select('area', [], [], ['id'=>'area','class' => 'form-control','placeholder' => 'Select Area']) }}
{!! Form::label('start_date', __('Start Date')) !!} {{ Form::date('start_date', $start_date, ['id'=>'date','class' => 'form-control','placeholder' => 'Select Date']) }}
{!! Form::label('end_date', __('End Date')) !!} {{ Form::date('end_date', $end_date, ['id'=>'date','class' => 'form-control','placeholder' => 'Select Date']) }}
{!! Form::submit(__('Filter'), ['class' => 'btn btn-primary']) !!}
{!! Form::close() !!}
@if (Session::has('message'))
{{ Session::get('message') }}
@endif @foreach($orders as $order) @php $governorates = DB::table('governorates')->where('id', $order->userAddress->governorate)->first(); $area = DB::table('areas')->where('id', $order->userAddress->area)->first(); @endphp @php $date = date('Y-m-d', strtotime($order->created_at)); $totalOrders[$date] = $order; @endphp @endforeach
Order ID Username Contact No Governorate Area Order Status Payment Type Total Amount Order Created
{{$order->order_id}} {{$order->user->name}} {{$order->userAddress->contact_no}} {{@$governorates->title}} {{$area->title}} {{$order->order_status}} {{$order->payment_type}} {{$order->grand_total}} KD {{dateConvertFormat($order->created_at)}}
{{-- @php $optionGraphValues = []; if(count($datesArr) > 0){ foreach ($datesArr as $key => $value) { $optionArr[] = [ 'label' => date('d M', strtotime($key)), 'y' => count($value), ]; } $optionGraphValues = json_encode($optionArr); } @endphp --}} @endsection @push('scripts') @endpush