|
|
@@ -101,10 +101,7 @@ class UserService extends BaseService
|
|
|
public static function paginate(array $search = [])
|
|
|
{
|
|
|
$limit = isset($search['limit']) ? $search['limit'] : 15;
|
|
|
- $paginator = static::$MODEL::where(self::getWhere($search))->with(['wallet' => function ($query) {
|
|
|
- // 使用 select 但确保包含外键
|
|
|
- $query->select('id', 'user_id', 'member_id', 'address', 'available_balance');
|
|
|
- }])
|
|
|
+ $paginator = static::$MODEL::where(self::getWhere($search))->with(['wallet'])
|
|
|
|
|
|
->orderByDesc('users.created_at')->paginate($limit);
|
|
|
|