maksuco/reports
Composer 安装命令:
composer require maksuco/reports
包简介
Get visits, pageviews etc
README 文档
README
This package helps manage analytics and counts.
Installation
This packages requires Spatie/Analytics for the charts You can install the package via composer:
$ composer require maksuco/Reports OR $ composer require maksuco/Reports:dev-master
This Package works with autodiscovery in Laravel +5.5, but is compatible with older versions
Usage
Spatie Laravel-Analytics is requiered to use google analytics, the package is automatically install but it needs the configuration, so you can also use methods like:
use Analytics;
use Spatie\Analytics\Period;
//fetch the most visited pages for today and the past week
Analytics::fetchMostVisitedPages(Period::days(7));
//fetch visitors and page views for the past week
Analytics::fetchVisitorsAndPageViews(Period::days(7));
https://github.com/spatie/laravel-analytics
Analytics Helpers
Analytics:Get the dates from today minus.... $period = 'month','day','year','all' $period2 = 1,2,3, etc..
\Reports::period($period,$period2);
Analytics:Get the visits and pageviews $path = /someurl/blogname
\Reports::counter($period,$period2,$path);
Analytics:Get the visits and pageviews for Charts $path = /someurl/blogname return [$visitors,$pageviews,$labels];
\Reports::chart($period,$period2,$path);
Analytics:Get the visits and pageviews for Charts
\Reports::charts($data1);
Reports
Get the $count and $sum of 2 fields per table, the date field is the one to be used, example: created_at
\Reports::reports($biz_id,$table,$date,$sum);
Get data for a chart Report, same as before, but this returns 'total_sum', 'total_count', 'date', 'sum' and 'count' so you can use it in charts data sets
$chart = \Reports::reports_chart($biz_id,$table,$date,$field); {!! $chart['sum'] !!}
Security
If you discover any security related issues, please report it.
Credits
License
The MIT License (MIT). Please see License File for more information.
统计信息
- 总下载量: 26
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2018-08-01