added last seen 3
This commit is contained in:
@@ -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(),
|
||||
|
||||
Reference in New Issue
Block a user