field("id,uid,nickname,type,title,module,controller,function,param,content,create_time") ->order('create_time desc') ->where($where) ->paginate($rows, false, ['query' => $param]); $content->toArray(); $date_set = new Dateset(); foreach ($content as $k => $v) { $data = $v; $param_array = json_decode($v['param'], true); $name = ''; if (!empty($param_array['name'])) { $name = ':' . $param_array['name']; } if (!empty($param_array['title'])) { $name = ':' . $param_array['title']; } $data['content'] = $v['content'] . $name; $data['times'] = $date_set->time_trans($v['create_time']); $content->offsetSet($k, $data); } return $content; } }