修复 搜索
This commit is contained in:
parent
0cfad6e0cf
commit
16388e1561
@ -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) {
|
foreach (['name', 'module_id', 'status', 'user_id', 'price', 'managed_price', 'created_at', 'updated_at'] as $field) {
|
||||||
if ($request->has($field)) {
|
if ($request->has($field)) {
|
||||||
$hosts->where($field, 'like', '%' . $request->input($field) . '%');
|
$hosts = $hosts->where($field, 'like', '%' . $request->input($field) . '%');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user