@php use App\Models\{Property,PropertyPlot,PropertyOwner,Order,Transactions}; @endphp
Registered Property Owners
This Year

{{PropertyOwner::whereYear('created_at',date('Y'))->count()}}

This Month

{{PropertyOwner::whereYear('created_at',date('Y'))->whereMonth('created_at',date('M'))->count()}}

Registered Properties
This Year

{{Property::whereYear('created_at',date('Y'))->count()}}

This Month

{{Property::whereYear('created_at',date('Y'))->whereMonth('created_at',date('M'))->count()}}

Orders
This Year

{{Order::whereYear('created_at',date('Y'))->count()}}

This Month

{{Order::whereYear('created_at',date('Y'))->whereMonth('created_at',date('M'))->count()}}

Amount Ordered
This Year

TZS {{number_format(Order::whereYear('created_at',date('Y'))->sum('amount'),0,'.',',')}}

This Month

TZS {{number_format(Order::whereYear('created_at',date('Y'))->whereMonth('created_at',date('M'))->sum('amount'),0,'.',',')}}

Completed Orders
This Year

{{Order::whereYear('created_at',date('Y'))->where('status',2)->count()}}

This Month

{{Order::whereYear('created_at',date('Y'))->whereMonth('created_at',date('M'))->where('status',2)->count()}}

Completed Order Amount
This Year

TZS {{number_format(Order::whereYear('created_at',date('Y'))->where('status',2)->sum('amount'),0,'.',',')}}

This Month

TZS {{number_format(Order::whereYear('created_at',date('Y'))->whereMonth('created_at',date('M'))->where('status',2)->sum('amount'),0,'.',',')}}

Recent Completed Orders

{{Order::where('status',2)->orderBy('created_at','DESC')->count()}} Results Found

@foreach(Order::where('status',2)->orderBy('created_at','DESC')->limit(5)->get() as $index => $order) @endforeach
# Reference ID Project Plot No Amount Created On Completed On
{{++$index}} {{$order->referenceid}} {{Property::find($order->propertyid)->name}} {{PropertyPlot::find($order->plotid)->plotnumber}} TZS {{number_format($order->amount,0,'.',',')}} {{$order->created_at}} {{$order->updated_at}}