From 05da65282239eac73dbd607344d98e39f89b4d40 Mon Sep 17 00:00:00 2001 From: mengwb Date: Thu, 8 Jun 2023 03:23:35 +0000 Subject: [PATCH] =?UTF-8?q?!121=20=E4=BC=98=E5=8C=96=20*=20=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- beike/Repositories/RmaRepo.php | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/beike/Repositories/RmaRepo.php b/beike/Repositories/RmaRepo.php index 78733dd2..f3828e55 100644 --- a/beike/Repositories/RmaRepo.php +++ b/beike/Repositories/RmaRepo.php @@ -95,9 +95,9 @@ class RmaRepo /** * @param $data - * @return LengthAwarePaginator + * @return Builder */ - public static function list($data): LengthAwarePaginator + public static function getBuilder($data): Builder { $builder = Rma::query(); @@ -124,7 +124,16 @@ class RmaRepo } $builder->orderBy('id', 'DESC'); - return $builder->paginate(perPage())->withQueryString(); + return $builder; + } + + /** + * @param $data + * @return LengthAwarePaginator + */ + public static function list($data): LengthAwarePaginator + { + return self::getBuilder($data)->paginate(perPage())->withQueryString(); } /**