From e532cce5e1698e4c70a1e48bc450c1624117f320 Mon Sep 17 00:00:00 2001 From: vine_liutk <961510893@qq.com> Date: Thu, 3 Nov 2022 17:14:56 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E8=BF=87=E6=BB=A4=E5=99=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/ModelFilters/CropFilter.php | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/app/ModelFilters/CropFilter.php b/app/ModelFilters/CropFilter.php index cc5da8d..f103fed 100644 --- a/app/ModelFilters/CropFilter.php +++ b/app/ModelFilters/CropFilter.php @@ -6,15 +6,6 @@ use EloquentFilter\ModelFilter; class CropFilter extends ModelFilter { - public function categoryId($categoryId) - { - return $this->where('category_id', $categoryId); - } - - public function parentId($parentId){ - return $this->where('parent_id', $parentId); - } - public function type($type) { $q = $this; @@ -34,4 +25,14 @@ class CropFilter extends ModelFilter public function cropType($cropType){ return $this->where('crop_type', $cropType); } + + public function category($categoryId) + { + return $this->where('category_id', $categoryId); + } + + + public function parent($parentId){ + return $this->where('parent_id', $parentId); + } }