validate([ 'page' => ['nullable', 'integer', 'min:1'], 'limit' => ['nullable', 'integer', 'min:1', 'max:200'], 'user_id' => ['nullable', 'integer', 'min:1'], 'member_id' => ['nullable', 'string', 'max:64'], 'username' => ['nullable', 'string', 'max:128'], 'first_name' => ['nullable', 'string', 'max:128'], 'player_id' => ['nullable', 'string', 'max:32'], 'platform' => ['nullable', 'string', 'max:32'], 'game_order_id' => ['nullable', 'string', 'max:128'], 'game_type' => ['nullable', 'integer', 'in:1,2,3,4,5,6,7'], 'status' => ['nullable', 'integer', 'in:0,1,2,3'], 'start_time' => ['nullable', 'date_format:Y-m-d H:i:s', 'required_with:end_time'], 'end_time' => [ 'nullable', 'date_format:Y-m-d H:i:s', 'required_with:start_time', 'after_or_equal:start_time', ], ]); $sync = $service->syncForList($params); $result = $service->paginate($params); $result['sync'] = $sync; return $this->success($result); } catch (ValidationException $e) { return $this->error(HttpStatus::CUSTOM_ERROR, $e->validator->errors()->first()); } catch (Exception $e) { return $this->error(HttpStatus::CUSTOM_ERROR, $e->getMessage()); } } }