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.

this is a statistics package for laravel

dev-master 2016-08-19 04:20 UTC

This package is auto-updated.

Last update: 2021-08-21 13:31:20 UTC


Statistics package provides a simple way to custom any statistics to Laravel4.

Quick start

Required setup

In the require key of composer.json file add the following

"davin-bao/statistics": "dev-master"

Run the Composer update comand

$ composer update

In your config/app.php add 'DavinBao\Statistics\StatisticsServiceProvider',' to the end of the $providers array

'providers' => array(



At the end of config/app.php add 'Statistics' => 'DavinBao\Statistics\StatisticsFacade' to the $aliases array

'aliases' => array(

    'App'        => 'Illuminate\Support\Facades\App',
    'Artisan'    => 'Illuminate\Support\Facades\Artisan',
    'Statistics'       => 'DavinBao\Statistics\StatisticsFacade',



Create Table

Now generate the statistics migration

$ php artisan statistics:migration

It will generate the <timestamp>_statistics_setup_tables.php migration. You may now run it with the artisan migrate command:

$ php artisan migrate

After the migration, statistics tables will be present.

Create Controllers & Views

$ php artisan statistics:views

Create Routes

$ php artisan statistics:routes


Go to /admin/statistics, you can change the style or add others functions