feat(admin): 仪表盘补齐订阅到期治理入口(7天内到期/已过期)
This commit is contained in:
@@ -38,6 +38,15 @@ class DashboardController extends Controller
|
||||
// 收费中心(平台侧)
|
||||
'plans' => Plan::count(),
|
||||
'site_subscriptions' => SiteSubscription::count(),
|
||||
'site_subscriptions_expired' => SiteSubscription::query()
|
||||
->whereNotNull('ends_at')
|
||||
->where('ends_at', '<', now())
|
||||
->count(),
|
||||
'site_subscriptions_expiring_7d' => SiteSubscription::query()
|
||||
->whereNotNull('ends_at')
|
||||
->where('ends_at', '>=', now())
|
||||
->where('ends_at', '<', now()->addDays(7))
|
||||
->count(),
|
||||
'platform_orders' => PlatformOrder::count(),
|
||||
'platform_orders_unpaid_pending' => PlatformOrder::query()
|
||||
->where('payment_status', 'unpaid')
|
||||
|
||||
Reference in New Issue
Block a user