Oxicode / laravel-model-stats

Model statistics dashboard for your Laravel Application

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Laravel Model Stats

Model statistics dashboard for your Laravel Application

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads


This Laravel packages gives you a statistic dashboard for you Laravel application. Think of it as a light version of Grafana, but built-in your Laravel application, and much easier to get started with. No code knowledge is required to use Laravel Model Stats, users can do everything from the web interface.


You can install the package via composer:

composer require jhumanj/laravel-model-stats

You can install the package and run the migrations with:

php artisan model-stats:install
php artisan migrate

Available Aggregation Types

Different type of aggregation types (daily count, daily average, etc.) are available. When creating a widget, you choose a Model, an aggregation type and the column(s) for the graph.

The aggregation types currently available:

  • Daily Count (Number of records per day. Date can be anything: created_at,updated_at,custom_date...)
  • ... (more to come soon)

Dashboard Authorization

The ModelStats dashboard may be accessed at the /stats route. By default, you will only be able to access this dashboard in the local environment. Within your app/Providers/ModelStatsServiceProvider.php file, there is an authorization gate definition. This authorization gate controls access to ModelStats in non-local environments. You are free to modify this gate as needed to restrict access to your ModelStats installation:

 * Register the ModelStats gate.
 * This gate determines who can access ModelStats in non-local environments.
 * @return void
protected function gate()
    Gate::define('viewModelStats', function ($user) {
        return in_array($user->email, [


Be sure to re-publish the front-end assets when upgrading ModelStats:

php artisan model-stats:publish


Please see CHANGELOG for more information on what has changed recently.


Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits (Contributors)


  • Grafana: for the dashboard/widget aspect
  • Laravel Telescope: for many things in the package structure (front-end, authorization...)


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


Model statistics dashboard for your Laravel Application

License:MIT License


Language:Vue 49.6%Language:JavaScript 27.3%Language:PHP 21.0%Language:Blade 1.6%Language:SCSS 0.5%