1. Go to this page and download the library: Download kakaprodo/system-analytic 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/ */
class AnalyticHandlerRegister extends AnalyticHandlerRegisterBase
{
/**
* register a key value array of your handlers,
* where the key is the analytic_type and the value
* is the actual handler
*/
public static function handlers(): array
{
return [
NewUserBarChart::type() => NewUserBarChart::class,
];
}
}
$options = [
'scope_value' => date based on the scope_type,
'scope_from_date' => date or dateTime based on your need,
'scope_to_date' => date or dateTime based on your need,
'search_value' => string or Array,
'should_export' => Bool,
'file_type' => string between [csv,xlsx],
'selected_option' => string,
'should_clear_cache' => Bool
];
sh
php artisan system-analytic:config
sh
php artisan system-analytic:install
sh
php artisan system-analytic:handler NewUserBarChart --bar-chart
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.