PHP code example of lavoweb / magento2-customreports

1. Go to this page and download the library: Download lavoweb/magento2-customreports 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/ */

    

lavoweb / magento2-customreports example snippets


#!php

'db' => 
        array (
            'table_prefix' => '',
            'connection' => 
                array (
                    'default' => 
                        array (
                            'host' => '127.0.0.1',
                            'dbname' => 'database_name',
                            'username' => 'database_user',
                            'password' => 'database_password',
                            'model' => 'mysql4',
                            'engine' => 'innodb',
                            'initStatements' => 'SET NAMES utf8;',
                            'active' => '1',
                        ),
                    'readonly' =>
                        array (
                            'host' => '127.0.0.1',
                            'dbname' => 'database_name',
                            'username' => 'database_readonly_user',
                            'password' => 'database_readonly_password',
                            'model' => 'mysql4',
                            'engine' => 'innodb',
                            'initStatements' => 'SET NAMES utf8;',
                            'active' => '1',
                        ),
                ),
        ),
    'resource' =>
        array (
            'default_setup' => array ('connection' => 'default'),
            'readonly' => array('connection' => 'readonly')
        ),