Ken vor 5 Tagen
Ursprung
Commit
0bae71e55e
1 geänderte Dateien mit 6 neuen und 5 gelöschten Zeilen
  1. 6 5
      app/Http/Controllers/admin/User.php

+ 6 - 5
app/Http/Controllers/admin/User.php

@@ -62,15 +62,16 @@ class User extends Controller
                 'username' => ['nullable', 'string', 'min:1'],
             ]);
             $search['limit'] = 3;
-            $result['total'] = 80;
-            $result['data'] =  \App\Models\User::where(UserService::getWhere($search))
-                ->with(['wallet'])->forPage($search['page'], $search['limit'])
-                ->get();
+//            $result['total'] = 80;
+//            $result['data'] =  \App\Models\User::where(UserService::getWhere($search))
+//                ->with(['wallet'])->forPage($search['page'], $search['limit'])
+//                ->get();
 
 
 
 
-//            $result = UserService::paginate($search);
+            $result = UserService::paginate($search);
+            $result['total'] = 80;
         } catch (ValidationException $e) {
             return $this->error(HttpStatus::CUSTOM_ERROR, $e->validator->errors()->first());
         } catch (Exception $e) {