|
|
@@ -83,8 +83,10 @@ class BackflowService extends BaseService
|
|
|
$query1->where('username', $username);
|
|
|
});
|
|
|
}
|
|
|
+ $count = $query->count();
|
|
|
$query->with(['user'])->orderByDesc('date')->orderBy('status');
|
|
|
- $paginator = $query->paginate($limit);
|
|
|
- return ['total' => $paginator->total(), 'data' => $paginator->items()];
|
|
|
+ $list = $query->forPage($page, $limit)->get()->toArray();
|
|
|
+
|
|
|
+ return ['total' => $count, 'data' => $list];
|
|
|
}
|
|
|
}
|