Laravel ORM 数据model操作 怎么写 like 查询?
$args_data = $request->all();
//定义查询条件数组
$where = [];
//日志分组名称
if ( $args_data['group_name'] ) {
$where['group_name'] = $args_data['group_name']; //怎么写like查询?
}
$log_group = LogGroup::where($where)
->orderBy($request->input('sort'), $request->input('order'))
->paginate($request->input('limit'))
->toArray();
1 个回复
[已注销]
赞同来自: