PHP code example of bjorndcode / nova-analytics
1. Go to this page and download the library: Download bjorndcode/nova-analytics library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
bjorndcode / nova-analytics example snippets
// in app/Providers/NovaServiceProvder.php
// ...
public function tools()
{
return [
// ...
new \BjornDCode\NovaAnalyticsTool\AnalyticsTool(),
];
}
// 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,
],
]);
}