added last seen 3

This commit is contained in:
2026-07-22 18:14:36 +03:30
parent 5751e2cd24
commit 1d02276475
@@ -64,11 +64,12 @@ class CustomerController extends SuperController
$threshold = now()->subSeconds(CustomerPresenceService::ONLINE_THRESHOLD_SECONDS);
$rows = Customer::query()
->with('referral')
->where('is_archive', false)
->whereNotNull('last_seen_at')
->where('last_seen_at', '>=', $threshold)
->orderByDesc('last_seen_at')
->get(['id', 'name', 'mobile', 'last_seen_at', 'active', 'trade_active', 'type']);
->get();
return response()->json([
'count' => $rows->count(),