@extends('layouts.caterer') @section('title', 'Dashboard') @section('content') @php $user_count = DB::table('users')->where('is_admin','0')->whereNull('caterer_id')->whereNull('deleted_at')->count(); $caterer_count = DB::table('users')->where('is_admin','1')->where('caterer_id','!=','')->whereNull('deleted_at')->count(); $caterer_item_count = DB::table('caterer_items')->where('organisation',Auth::user()->caterer_id)->where('status','1')->whereNull('deleted_at')->count(); $orders_count = DB::table('orders')->where('caterer_id',Auth::user()->caterer_id)->count(); $orders_to_be_count = DB::table('orders')->where('caterer_id',Auth::user()->caterer_id)->where('order_status','pending')->count(); $orders_cancel = DB::table('orders')->where('caterer_id',Auth::user()->caterer_id)->where('order_status','on the way')->count(); $orders_delivered_count = DB::table('orders')->where('caterer_id',Auth::user()->caterer_id)->where('order_status','delivered')->count(); $orders_accept_count = DB::table('orders')->where('caterer_id',Auth::user()->caterer_id)->where('order_status','accepted')->count(); $panddingItem = DB::table('orders')->where('order_status','pending')->orderBy('order_sorting')->get(); $wayItem = DB::table('orders')->where('order_status','on the way')->orderBy('order_sorting')->get(); $acceptItem = DB::table('orders')->where('order_status','accepted')->orderBy('order_sorting')->get(); $completeItem = DB::table('orders')->where('order_status','delivered')->orderBy('order_sorting')->get(); @endphp