简易输入提示

This commit is contained in:
2022-08-08 14:19:08 +08:00
parent 5f50dc8f2e
commit 9609aef740
8 changed files with 265 additions and 2 deletions

View File

@ -59,4 +59,12 @@ class ProgramAppendConstructController extends BaseController
]));
}
public function from_list(Request $request) {
$query = ProgramAppends::query()->groupBy("from")->select("from")->selectRaw("count(1) as total_count")->orderByDesc("total_count");
if ($request->has("value")) {
$keyword = $request->get("value");
$query->where("from", "like", "%{$keyword}%");
}
return $query->get()->toArray();
}
}