@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

Caterer Dashboard


@if (Session::has('message'))
{{ Session::get('message') }}
@endif

{{$orders_count}}

Caterer Booking

More info

{{$caterer_item_count}}

Caterer Items

More info
Orders To Deliver {{$orders_to_be_count}}
    @if(!empty($panddingItem) && $panddingItem->count()) @foreach($panddingItem as $key=>$value)
  • {{ $value->title }}
  • @endforeach @endif
Order Accepted {{$orders_accept_count}}
    @if(!empty($acceptItem) && $acceptItem->count()) @foreach($acceptItem as $key=>$value)
  • {{ $value->title }}
  • @endforeach @endif
On The Way Orders {{$orders_cancel}}
    @if(!empty($wayItem) && $wayItem->count()) @foreach($wayItem as $key=>$value)
  • {{ $value->title }}
  • @endforeach @endif
Order Delivered {{$orders_delivered_count}}
    @if(!empty($completeItem) && $completeItem->count()) @foreach($completeItem as $key=>$value)
  • {{ $value->title }}
  • @endforeach @endif
@endsection