BjornDCode / nova-analytics

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Nova Analytics

Latest Version on Packagist Total Downloads

Nova Analytics adds a page for analytics in Laravel Nova. It works well if you want to keep your analytics away from the Dashboard page or want more detailed analytics pages.

By default there is a main analytics page but you can easily add subpages with more detailed analytics.

You can load any card you want on the analytics pages.

screen shot 2018-08-24 at 21 01 25

Installation

You can install the package in to a Laravel app that uses Nova via composer:

composer require bjorndcode/nova-analytics

Next up, you must register the tool with Nova. This is typically done in the tools method of the NovaServiceProvider.

// in app/Providers/NovaServiceProvder.php

// ...

public function tools()
{
    return [
        // ...
        new \BjornDCode\NovaAnalyticsTool\AnalyticsTool(),
    ];
}

Usage

In NovaServiceProvider you must register all the cards and pages you want.

// in app/Providers/NovaServiceProvder.php

// ...

public function boot()
{
    parent::boot();

    // Add any cards you want shown on the main "Analytics" page
    AnalyticsDashboard::registerIndexCards([
        // new Metric,
    ]);

    // Add any subpages here
    // The key is the subpage name
    AnalyticsDashboard::registerPages([
        'pageName' => [
            // new Metric,
        ],
    ]);
}

Click on the "Analytics" menu item in your Nova app to see the cards.

Supported Cards

You can add any cards you want. A good example is the custom metrics you've created for Nova. You can also add cards from other packages. Here is a list of cards that can be useful:

Changelog

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

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email bjornlindholmhansen@gmail.com instead of using the issue tracker.

Credits

License

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

About

License:MIT License


Languages

Language:PHP 68.0%Language:Vue 16.5%Language:HTML 11.8%Language:JavaScript 3.8%