Like most web frameworks, KoolReport needs help of css, js client files. KoolReport.js is one of the client files.
On your localhost machine, the local web server normally allows client access of the https://localhost/{path to}/koolreport/core/src/clients/core/KoolReport.js
file.
But on your server, it's most likely that the production web server doesn't allow direct access of client files inside PHP packages installed in vendor
directory for security reasons. In this case, KoolReport needs to copy its client files to a koolreport_assets subdirectory inside a public directory for user browsers to be able to load them.
For KoolReport to know where to place koolreport_assets subdirectory in, you would need to set a report's assets
setting as described here:
https://www.koolreport.com/docs/architecture/assets_settings/
class MyReport extends \koolreport\KoolReport
{
protected function settings()
{
return array(
...
"assets"=>array(
"path"=>"../../public_dir/koolreport_assets", //file path to the public directory's koolreport_assets sub dir
"url"=>"/public_dir/koolreport_assets", //url to the public directory's koolreport_assets sub dir
)
);
}
}
Or if you Laravel you can use the following Laravel friendship trait instead:
https://www.koolreport.com/docs/laravel/overview/
class MyReport extends \koolreport\KoolReport
{
use \koolreport\laravel\Friendship;
// By adding above statement, you have claim the friendship between two frameworks
// As a result, this report will be able to accessed all databases of Laravel
// There are no need to define the settings() function anymore
// while you can do so if you have other datasources rather than those
// defined in Laravel.