不需要也行

This commit is contained in:
iVampireSP.com 2022-12-27 18:56:17 +08:00
parent 16388e1561
commit 39918b3422
No known key found for this signature in database
GPG Key ID: 2F7B001CA27A8132

View File

@ -25,7 +25,7 @@ public function index(Request $request): View
// 遍历所有的搜索条件
foreach (['name', 'module_id', 'status', 'user_id', 'price', 'managed_price', 'created_at', 'updated_at'] as $field) {
if ($request->has($field)) {
$hosts = $hosts->where($field, 'like', '%' . $request->input($field) . '%');
$hosts->where($field, 'like', '%' . $request->input($field) . '%');
}
}