正在显示
1 个修改的文件
包含
5 行增加
和
10 行删除
| @@ -147,16 +147,11 @@ class ComController extends BaseController | @@ -147,16 +147,11 @@ class ComController extends BaseController | ||
| 147 | } | 147 | } |
| 148 | 148 | ||
| 149 | public function ceshi(){ | 149 | public function ceshi(){ |
| 150 | - // 获取上个月的开始时间 | ||
| 151 | - $startTime = Carbon::now()->subMonth()->startOfMonth()->toDateString(); | ||
| 152 | - // 获取上个月的结束时间 | ||
| 153 | - $endTime = Carbon::now()->subMonth()->endOfMonth()->toDateString(); | ||
| 154 | - $arr['referrer_url'] = DB::table('gl_customer_visit_item') | ||
| 155 | - ->select('device_port',DB::raw('COUNT(*) as num')) | ||
| 156 | - ->orderBy('num','desc') | ||
| 157 | - ->groupBy('device_port')->where(['domain'=>'http://lxl.petuu.shop/']) | ||
| 158 | - ->limit(15)->get()->toArray(); | ||
| 159 | - return $arr; | 150 | + $source = DB::table('gl_customer_visit') |
| 151 | + ->select('referrer_url', DB::raw('COUNT(*) as count')) | ||
| 152 | + ->groupBy('referrer_url')->where(['domain'=>'http://lxl.petuu.shop/']) | ||
| 153 | + ->orderByDesc('count')->limit(10)->get()->toArray(); | ||
| 154 | + return $source; | ||
| 160 | } | 155 | } |
| 161 | 156 | ||
| 162 | /** | 157 | /** |
-
请 注册 或 登录 后发表评论