增加 更多的字段
This commit is contained in:
parent
2a07a3c045
commit
9d0b825071
@ -23,7 +23,7 @@ public function index(Request $request): View
|
|||||||
$hosts = Host::with('user');
|
$hosts = Host::with('user');
|
||||||
|
|
||||||
// 遍历所有的搜索条件
|
// 遍历所有的搜索条件
|
||||||
foreach (['name', 'module_id', 'status', 'user_id'] 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->where($field, 'like', '%' . $request->input($field) . '%');
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user