📅  最后修改于: 2022-03-11 14:54:16.953000             🧑  作者: Mango
if ($request->search) {
$users = User::where('type', '=', 'Customer')
->where(function ($query) use ($request) {
$query->where('name', "like", "%" . $request->search . "%");
$query->orWhere('mobile', "like", "%" . $request->search . "%");
})->get();
}