CakePHP is one of earliest and greatest MVC framework for PHP. CakePHP has reached version 4.x with great improvement toward modern standard. CakePHP provide clean code, fast speed and large support community.
KoolReport is reporting framework and can be integrated into CakePHP or any other MVC framework.KoolReport help you to create data report faster and easier.
In this repository, we would like to demonstrate how KoolReport can be used inside CakePHP.
Run composer
command to install koolreport\core
composer require koolreport\core
- Inside
src
folder, createReports
folder to hold your reports - Create
MyReport.php
andMyReport.view.php
insideReports
folder. Please see the contents of two files in our repository. - Inside
webroot
folder, create folderkoolreport_assets
to hold resources created by KoolReport
In PagesController
, create report()
action:
public function report()
{
$report = new \App\Reports\MyReport;
$report->run();
$this->set("report",$report);
return $this->render();
}
Configure the routes inside config/routes.php
$builder->connect('/report', ['controller' => 'Pages', 'action' => 'report']);
All done!
Now you can access:
http://locahost/cakephp-example/report
you will see
KoolReport is a great php reporting framework. You can use KoolReport alone with pure php or inside any modern MVC frameworks like CakePHP, Laravel, Symfony. If you have any questions regarding KoolReport, free free to contact us at our forum or email to support@koolreport.com.
Happy Reporting!