@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
{{$orders_count}}
Caterer Booking
{{$caterer_count}}
Caterers
{{$user_count}}
User Registrations
{{$caterer_item_count}}
Caterer Items
ID |
Name |
Status |
Date |
@php $a = 1; @endphp
@foreach($users as $user)
{{$a}} |
{{ucfirst($user->first_name)}} {{ucfirst($user->last_name)}} |
@if($user->status=='1')Active @else In-Active @endif |
{{$user->created_at}} |
@php $a++; @endphp
@endforeach
Order ID |
Invoice Date |
Status |
Payment Type |
@foreach($orders as $order)
{{$order->invoice_id}} |
{{$order->invoice_date}} |
{{$order->order_status}} |
{{$order->payment_type}} |
@endforeach
Order Delivered
{{$orders_delivered_count}}
Orders To Deliver
{{$orders_to_be_count}}
Booking Cancelled
{{$orders_cancel}}
Total Booking
{{$orders_count}}
@endsection