mirror of
https://gitee.com/apiadmin/ApiAdmin.git
synced 2025-04-06 03:58:00 +08:00
搜索词为空时的逻辑
This commit is contained in:
parent
5bce5133e6
commit
6bb3c1f15d
@ -34,7 +34,9 @@ class AppGroup extends Base {
|
||||
if ($type) {
|
||||
switch ($type) {
|
||||
case 1:
|
||||
$obj = $obj->where('hash', $keywords);
|
||||
if (strlen($keywords)) {
|
||||
$obj = $obj->where('hash', $keywords);
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
$obj = $obj->whereLike('name', "%{$keywords}%");
|
||||
|
Loading…
x
Reference in New Issue
Block a user