code: protected function bindPageResolver(): void
      {
          /** Override the current page resolution */
          AbstractPaginator::currentPageResolver(function ($pageName) {
              $pagination = app(EncodingParametersInterface::class)->getPaginationParameters() ?: [];
  
              return $pagination[$pageName] ?? null;
          });
      }
docs: Override the page resolver to read the page parameter from the JSON API request.
  
  @return void