This package is not installable via Composer 1.x, please make sure you upgrade to Composer 2+. Read more about our Composer 1.x deprecation policy.

Get visits, pageviews etc

Installs: 21

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 2

Forks: 0

Open Issues: 0


v0.7.5 2018-08-24 22:59 UTC

This package is not auto-updated.

Last update: 2021-07-24 12:50:52 UTC


This package helps manage analytics and counts.


This packages requires Spatie/Analytics for the charts You can install the package via composer:

$ composer require maksuco/Reports
$ composer require maksuco/Reports:dev-master

This Package works with autodiscovery in Laravel +5.5, but is compatible with older versions


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

//fetch visitors and page views for the past week

Analytics Helpers

Analytics:Get the dates from today minus.... $period = 'month','day','year','all' $period2 = 1,2,3, etc..


Analytics:Get the visits and pageviews $path = /someurl/blogname


Analytics:Get the visits and pageviews for Charts $path = /someurl/blogname return [$visitors,$pageviews,$labels];


Analytics:Get the visits and pageviews for Charts



Get the $count and $sum of 2 fields per table, the date field is the one to be used, example: created_at


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'] !!}


If you discover any security related issues, please report it.



The MIT License (MIT). Please see License File for more information.