From d0ae3b9af0116b7565ce7474421bb74152763132 Mon Sep 17 00:00:00 2001 From: liapples Date: Mon, 23 Aug 2021 14:45:56 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0orderBy?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/AdminAgent/Renderable/SelectProduct.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/AdminAgent/Renderable/SelectProduct.php b/app/AdminAgent/Renderable/SelectProduct.php index 4601b54..0e23f68 100644 --- a/app/AdminAgent/Renderable/SelectProduct.php +++ b/app/AdminAgent/Renderable/SelectProduct.php @@ -24,7 +24,7 @@ class SelectProduct extends LazyRenderable $grid->disableBatchDelete(); $grid->disableBatchActions(); - $grid->model()->where('status', ProductStatus::ON_SALE); + $grid->model()->where('status', ProductStatus::ON_SALE)->orderBy('id'); $grid->quickSearch(['title', 'supplier.name'])->placeholder('搜索产品名称、供应商'); $grid->column('id');