Compare commits
No commits in common. "007f5bb08d460f035383cdb572264af7fdbef5aa" and "fc8d414a199f7788f916ae0fb9919ad5563669a4" have entirely different histories.
007f5bb08d
...
fc8d414a19
|
|
@ -38,18 +38,8 @@ class MonitorModeFilter extends ModelFilter
|
||||||
/**
|
/**
|
||||||
* 分组
|
* 分组
|
||||||
*/
|
*/
|
||||||
public function groupTags($groupTags){
|
public function groupTags($groupTags)
|
||||||
if(strpos($groupTags, ',')){
|
{
|
||||||
$this->where(function($q) use ($groupTags) {
|
return $this->whereRaw("FIND_IN_SET(group_tags,'$groupTags')");
|
||||||
foreach(explode(',', $groupTags) as $tag){
|
|
||||||
$q->whereRaw("FIND_IN_SET('".$tag."',group_tags)");
|
|
||||||
}
|
|
||||||
return $q;
|
|
||||||
});
|
|
||||||
|
|
||||||
}else{
|
|
||||||
return $this->whereRaw("FIND_IN_SET('".$groupTags."',group_tags)");
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue