调整过滤器
parent
542bc677c5
commit
e532cce5e1
|
|
@ -6,15 +6,6 @@ use EloquentFilter\ModelFilter;
|
||||||
|
|
||||||
class CropFilter extends 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)
|
public function type($type)
|
||||||
{
|
{
|
||||||
$q = $this;
|
$q = $this;
|
||||||
|
|
@ -34,4 +25,14 @@ class CropFilter extends ModelFilter
|
||||||
public function cropType($cropType){
|
public function cropType($cropType){
|
||||||
return $this->where('crop_type', $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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue