$weid]); if (!empty($serach['keyword'])) { $query->where('name', 'like', '%' . $serach['keyword'] . '%'); } $res = $query->paginate(getpage())->toArray(); foreach ($res['data'] as &$vo) { $vo['share_img'] = toimg($vo['share_img']); $vo['anchor'] = LiveAnchor::getAnchor($vo['anchor_id']); $vo['start_time'] = time_format($vo['start_time']); } $data['data'] = $res; return $this->json($data); } }