@extends('layouts.admin') @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('status','1')->whereNull('deleted_at')->count(); $orders_count = DB::table('orders')->count(); $orders_to_be_count = DB::table('orders')->where('order_status','pending')->count(); $orders_cancel = DB::table('orders')->where('order_status','canceled')->count(); $orders_delivered_count = DB::table('orders')->where('order_status','delivered')->count(); $users = DB::table('users')->where('is_admin','0')->whereNull('caterer_id')->whereNull('deleted_at')->take(5)->orderBy('id','desc')->get(); $orders = DB::table('orders')->take(5)->orderBy('id','desc')->get(); @endphp

Dashboard


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

{{$orders_count}}

Caterer Booking

More info

{{$caterer_count}}

Caterers

More info

{{$user_count}}

User Registrations

More info

{{$caterer_item_count}}

Caterer Items

More info

Latest Members

@php $a = 1; @endphp @foreach($users as $user) @php $a++; @endphp @endforeach
ID Name Status Date
{{$a}} {{ucfirst($user->first_name)}} {{ucfirst($user->last_name)}} @if($user->status=='1')Active @else In-Active @endif {{$user->created_at}}

Latest Booking

@foreach($orders as $order) @endforeach
Order ID Invoice Date Status Payment Type
{{$order->invoice_id}} {{$order->invoice_date}} {{$order->order_status}} {{$order->payment_type}}
Order Delivered {{$orders_delivered_count}}
Orders To Deliver {{$orders_to_be_count}}
Booking Cancelled {{$orders_cancel}}
Total Booking {{$orders_count}}
@endsection