调整产量数据查询
parent
8f9aaf7669
commit
3ea56b7d68
|
|
@ -17,4 +17,11 @@ class CropYieldFilter extends ModelFilter
|
||||||
{
|
{
|
||||||
return $this->where('crop_id', $cropId);
|
return $this->where('crop_id', $cropId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function type($type)
|
||||||
|
{
|
||||||
|
return $this->whereHas('base', function($q) use ($type) {
|
||||||
|
return $q->where('type', $type);
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue