limit(10)->orderBy("id", "asc")->get(); $count = AD::where($where)->count(); $data = [ 'rows' => $rep->toArray(), 'count' => $count, ]; if (empty($rep->toArray())) { return Result::error("没有广告数据"); } return Result::success($data); } }