PHP code example of salekur / nova-report-generator
1. Go to this page and download the library: Download salekur/nova-report-generator 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/ */
salekur / nova-report-generator example snippets
return [
/**
* Name of the tool.
*
* This name will be displayed in the navigation bar and on the tool's index page.
*
*/
'name' => 'Reporter',
/**
* Path for the tool.
*
* This path will be used for building the url to the tool.
*
*/
'path' => 'reporter',
/**
* Icon name of the tool.
*
* This icon will be displayed on the navigation bar.
* Icons list can be found at https://heroicons.com
*
*/
'icon' => 'document-text',
/**
* Tool's visibility.
*
* This option determines whether the tool will be displayed in the navigation bar or not.
*
*/
'visible' => true,
/**
* Export options.
*
* Options for exporting data.
*
*/
'export' => [
/**
* Name of the export file.
*
* This name will be used for generating the file.
*
*/
// 'name' => 'export',
/**
* Channels for exporting data.
*
* This option determines which channels will be available for exporting data.
*
*/
'channels' => [
'csv' => true,
'pdf' => true
],
/**
* PDF options.
*
* Options for generating PDF.
*
*/
'config' => [
'format' => 'A4',
'orientation' => 'landscape',
'header' => [
// 'image' => public_path('images/logo.png'),
'title' => 'Invoice'
]
]
],
/**
* Models for the tool.
*
* This option determines which models will be available for generating reports.
*
*/
'models' => [
'user' => [
'name',
'email',
'created_at' => [
// label for the column
'label' => 'Date',
// if you want to use period filter then set 'period' to true
'period' => true
]
],
'order' => [
'number',
'status',
'price' => [
// if you want to use sum of number column then set 'summable' to true
'summable' => true
],
'created_at' => [
// label for the column
'label' => 'Date',
// if you want to use period filter then set 'period' to true
'period' => true
]
],
]
];
sh
php artisan vendor:publish --tag=reporter-config --provider=Salekur\NovaReportGenerator\ToolServiceProvider
sh
php artisan vendor:publish --tag=reporter-views --provider=Salekur\NovaReportGenerator\ToolServiceProvider
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.