6
0
Fork 0
jiqu-library-server/app/Admin/Metrics/Dashboard.php

24 lines
821 B
PHP

<?php
namespace App\Admin\Metrics;
use App\Models\AfterSale;
use App\Models\Order;
use App\Models\ProductSkuVerify;
class Dashboard
{
public static function title()
{
$num = [
'after_sales_wait_verify'=> AfterSale::where('state', AfterSale::STATE_VERIFY)->count(),
'after_sales_wait_shipping'=> AfterSale::where('state', AfterSale::STATE_SHIPPING)->count(),
'after_sales_wait_finance'=> AfterSale::where('state', AfterSale::STATE_FINANCE)->count(),
'orders_wait_shipping'=> Order::where('status', Order::STATUS_PAID)->where('shipping_state', '<', Order::SHIPPING_STATE_PROCESSED)->count(),
'skus_wait_verify'=> ProductSkuVerify::where('status', 0)->count(),
];
return view('admin.metrics.dashboard', compact('num'));
}
}