diff --git a/app/Http/Controllers/Admin/CustomerController.php b/app/Http/Controllers/Admin/CustomerController.php index 6aed2c6..fb4c320 100644 --- a/app/Http/Controllers/Admin/CustomerController.php +++ b/app/Http/Controllers/Admin/CustomerController.php @@ -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(),