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