作者 lyh

gx

... ... @@ -147,11 +147,12 @@ class ComController extends BaseController
}
public function ceshi(){
$source = DB::table('gl_customer_visit')
->select('referrer_url', DB::raw('COUNT(*) as count'))
->groupBy('referrer_url')->where(['domain'=>'http://lxl.petuu.shop/'])
->orderByDesc('count')->limit(10)->get()->toArray();
return json_encode($source);
$source_country = DB::table('gl_customer_visit')
->select('country',DB::raw('COUNT(*) as ip'),DB::raw('SUM(depth) as pv'))
->groupBy('country')->where(['domain'=>'http://lxl.petuu.shop/'])
->orderBy('ip','desc')->limit(15)->get()->toArray();
$arr['source_country'] = json_encode($source_country);
return $arr['source_country'];
}
/**
... ...