From b1c91690d69ac59f5965fa1dbf50b3b3f5f9ac62 Mon Sep 17 00:00:00 2001 From: Kim Youngwoo Date: Tue, 4 Feb 2025 18:20:46 +0900 Subject: [PATCH] Adding the withQueryString method to the paginator interface - According to the documentation, `paginate` has a `withQueryString` method. - See, https://laravel.com/docs/pagination#appending-query-string-values - Not only `cursorPaginate`, but also `paginate` and `simplePaginate` should implement `withQueryString` and work with it. ref: https://github.com/laravel/framework/pull/54460 --- src/Illuminate/Contracts/Pagination/Paginator.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/Illuminate/Contracts/Pagination/Paginator.php b/src/Illuminate/Contracts/Pagination/Paginator.php index c59f58b7138e..e7769d4ef21f 100644 --- a/src/Illuminate/Contracts/Pagination/Paginator.php +++ b/src/Illuminate/Contracts/Pagination/Paginator.php @@ -34,6 +34,13 @@ public function appends($key, $value = null); */ public function fragment($fragment = null); + /** + * Add all current query string values to the paginator. + * + * @return $this + */ + public function withQueryString(); + /** * The URL for the next page, or null. *