added last seen 3
This commit is contained in:
@@ -64,11 +64,12 @@ class CustomerController extends SuperController
|
|||||||
$threshold = now()->subSeconds(CustomerPresenceService::ONLINE_THRESHOLD_SECONDS);
|
$threshold = now()->subSeconds(CustomerPresenceService::ONLINE_THRESHOLD_SECONDS);
|
||||||
|
|
||||||
$rows = Customer::query()
|
$rows = Customer::query()
|
||||||
|
->with('referral')
|
||||||
->where('is_archive', false)
|
->where('is_archive', false)
|
||||||
->whereNotNull('last_seen_at')
|
->whereNotNull('last_seen_at')
|
||||||
->where('last_seen_at', '>=', $threshold)
|
->where('last_seen_at', '>=', $threshold)
|
||||||
->orderByDesc('last_seen_at')
|
->orderByDesc('last_seen_at')
|
||||||
->get(['id', 'name', 'mobile', 'last_seen_at', 'active', 'trade_active', 'type']);
|
->get();
|
||||||
|
|
||||||
return response()->json([
|
return response()->json([
|
||||||
'count' => $rows->count(),
|
'count' => $rows->count(),
|
||||||
|
|||||||
Reference in New Issue
Block a user