@php($new = \App\Models\Order::where('status',0)->where('follow',0)->when(auth()->user()?->branch_id, function ($query) { return $query->where('branch_id', auth()->user()?->branch_id); })->count())
@php($current = \App\Models\Order::where('status',1)->whereIn('follow', [0,1,2])->when(auth()->user()?->branch_id, function ($query) { return $query->where('branch_id', auth()->user()?->branch_id); })->count())
@php($previous = \App\Models\Order::where('status',1)->whereIn('follow', [3])->when(auth()->user()?->branch_id, function ($query) { return $query->where('branch_id', auth()->user()?->branch_id); })->count())
@php($declined = \App\Models\Order::where('status',2)->when(auth()->user()?->branch_id, function ($query) { return $query->where('branch_id', auth()->user()?->branch_id); })->count())
@php($order_history = \App\Models\Order::where('status',5)->when(auth()->user()?->branch_id, function ($query) { return $query->where('branch_id', auth()->user()?->branch_id); })->count())
{{ __('trans.orders') }}
{{ $current }}
{{ $new }}