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.
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(),
];
}
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.
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:
Please see CHANGELOG for more information on what has changed recently.
Please see CONTRIBUTING for details.
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
The MIT License (MIT). Please see License File for more information.