DeDmytro / laravel-metrics

Laravel package which provides an ability to display custom or default metrics widgets.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Laravel Metrics

Laravel Metrics provides an ability to display your custom or default metrics widgets. img.png

Stable Version Unstable Version Total Downloads License

Table of contents

Installation

To get the latest version of Laravel Metrics, simply require the project using Composer:

$ composer require dedmytro/laravel-metrics

Or manually update require block of composer.json and run composer update.

{
    "require": {
        "dedmytro/laravel-metrics": "^0.1"
    }
}

And run install command publishes config and assets

$ php artisan metrics:install

Using

Visit /metrics to see dashboard with default widgets. To manage visible widgets open config/metrics.php and check widgets key:

    'widgets' => [
        MysqlConnections::class,
        RequestsPerSecond::class,
        UsersOnline::class,
    ],

Widgets

To create your custom widget use default command. By default you can found generated widgets in ** app/Metrics/Widgets/**

$ php artisan metrics:widget ActiveUsersCount --type=value

There are few types of widgets (--type=):

--type=value

Default type, when no type specified. The simplest widget to display one value.

--type=multiple

Widget type which can be used to display multiple values with labels within one widget.

Roadmap

  • More default widgets
  • Live widgets
  • Chart widget

About

Laravel package which provides an ability to display custom or default metrics widgets.

License:MIT License


Languages

Language:PHP 66.7%Language:Blade 27.3%Language:SCSS 3.3%Language:JavaScript 2.7%