|
|
@@ -53,7 +53,6 @@ class User extends Controller
|
|
|
public function index(): JsonResponse
|
|
|
{
|
|
|
try {
|
|
|
-// $_GET['limit'] = 3;
|
|
|
$search = request()->validate([
|
|
|
'page' => ['nullable', 'integer', 'min:1'],
|
|
|
'limit' => ['nullable', 'integer', 'min:1'],
|
|
|
@@ -61,17 +60,7 @@ class User extends Controller
|
|
|
'first_name' => ['nullable', 'string', 'min:1'],
|
|
|
'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 = UserService::paginate($search);
|
|
|
- $result['total'] = 80;
|
|
|
} catch (ValidationException $e) {
|
|
|
return $this->error(HttpStatus::CUSTOM_ERROR, $e->validator->errors()->first());
|
|
|
} catch (Exception $e) {
|