Ken hace 7 horas
padre
commit
45e1c2dd2a
Se han modificado 1 ficheros con 1 adiciones y 0 borrados
  1. 1 0
      app/Services/UserService.php

+ 1 - 0
app/Services/UserService.php

@@ -104,6 +104,7 @@ class UserService extends BaseService
         $paginator = static::$MODEL::with(['wallet'])
             ->join('wallets', 'users.member_id', '=', 'wallets.member_id')
             ->where(self::getWhere($search))
+            ->orderByDesc('wallets.available_balance')
             ->orderByDesc('users.created_at')->paginate($limit);
         return ['total' => $paginator->total(), 'data' => $paginator->items()];
     }