@extends('admin.layouts.admin_master') @section('title', 'Dashboard') @section('content') @if (session('info'))
{{ session('info') }}
@endif

{{ $branches }}

Total Branch

{{ $companies }}

Total Company

{{ $all_manager }}

Total Manager

@if (Auth::user()->role == 'Super Admin' || Auth::user()->role == 'Admin')

{{ $all_staff }}

Total Staff

@else

{{ App\Models\User::where('role', 'Staff')->where('branch_id', Auth::user()->branch_id)->count() }}

Total Staff

@endif
@if (Auth::user()->role == 'Super Admin' || Auth::user()->role == 'Admin')

{{ $all_courier }}

Total Courier

@else

{{ App\Models\CourierSummary::where('sender_branch_id', Auth::user()->branch_id)->count() }}

Sender Courier

@endif
@if (Auth::user()->role == 'Super Admin' || Auth::user()->role == 'Admin')

{{ $all_message }}

All Message

@else

{{ App\Models\CourierSummary::where('receiver_branch_id', Auth::user()->branch_id)->count() }}

Receiver Courier

@endif
Courier All
@if (Auth::user()->role == 'Super Admin' || Auth::user()->role == 'Admin')
@endif
    @if (Auth::user()->role == 'Super Admin' || Auth::user()->role == 'Admin')
  • Processing: {{ App\Models\CourierSummary::where('courier_status', 'Processing')->count() }}
  • On the way: {{ App\Models\CourierSummary::where('courier_status', 'On the way')->count() }}
  • Shipped: {{ App\Models\CourierSummary::where('courier_status', 'Shipped')->count() }}
  • Delivered: {{ App\Models\CourierSummary::where('courier_status', 'Delivered')->count() }}
  • @else
  • Send Processing Courier: {{ App\Models\CourierSummary::where('sender_branch_id', Auth::user()->branch_id)->where('courier_status', 'Processing')->count() }}
  • Send On the way Courier: {{ App\Models\CourierSummary::where('sender_branch_id', Auth::user()->branch_id)->where('courier_status', 'On the way')->count() }}
  • Delivery On the way Courier: {{ App\Models\CourierSummary::where('receiver_branch_id', Auth::user()->branch_id)->where('courier_status', 'On the way')->count() }}
  • Delivery Processing Courier: {{ App\Models\CourierSummary::where('receiver_branch_id', Auth::user()->branch_id)->where('courier_status', 'Shipped')->count() }}
  • Delivered Courier: {{ App\Models\CourierSummary::where('sender_branch_id', Auth::user()->branch_id)->orWhere('receiver_branch_id', Auth::user()->branch_id)->where('courier_status', 'Delivered')->count() }}
  • @endif
@if (Auth::user()->role == 'Super Admin' || Auth::user()->role == 'Admin')
Courier Status - {{ date('Y') }}
Courier Status - {{ date('F,Y') }}
{{ App\Models\CourierSummary::whereMonth('created_at', date('m'))->whereYear('created_at', date('Y'))->where('courier_status', 'Processing')->count() }}

Processing

{{ App\Models\CourierSummary::whereMonth('created_at', date('m'))->whereYear('created_at', date('Y'))->where('courier_status', 'On the way')->count() }}

On the way

{{ App\Models\CourierSummary::whereMonth('created_at', date('m'))->whereYear('created_at', date('Y'))->where('courier_status', 'Shipped')->count() }}

Shipped

{{ App\Models\CourierSummary::whereMonth('created_at', date('m'))->whereYear('created_at', date('Y'))->where('courier_status', 'Delivered')->count() }}

Delivered

Courier Status - {{ date('Y')-1 }} vs {{ date('Y') }}
{{ date('Y')-1 }}
{{ date('Y') }}
Courier Type ({{ date('Y') }})
@endif @endsection @section('script') @endsection