调整过滤器

dev
vine_liutk 2022-11-03 17:14:56 +08:00
parent 542bc677c5
commit e532cce5e1
1 changed files with 10 additions and 9 deletions

View File

@ -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);
}
}