场景:sql查询时我需要第一个条件必须,第二个条件中两个字段有一个
$yaml_data = SystemConfig::Where('application_item', $where['application_item']) ->where(function($query) use ($keywords) { $query->orwhere('config_item', 'like', "%{$keywords}%") ->orwhere('describe', 'like', "%{$keywords}%"); })->paginate()->toArray();