PHP code example of koolreport / platesphp

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

    

koolreport / platesphp example snippets

bash
project/
├── reports/
│   └── MyReport.php
├── views/
│   └── myreport.phtml



class MyReport extends \koolreport\KoolReport
{
    use \koolreport\platesphp\Engine;
    
    protected function platesInit()
    {
        return League\Plates\Engine::create(dirname(__FILE__).'/../views');
    }
    ...

}

<html>
<head>
    <title>MyReport</title>
</head>
<body>
    
    \koolreport\widgets\koolphp\Table::create(array(
        "dataSource"=>$report->dataStore("result"),
    ));
    

//index.php

ew MyReport;
$report->run()->render("myreport"); // You need to specify the view you want to render