I have a working DataGrid report on a php site and am currently upgrading that site to Laravel. I decided to install KoolReports 4.5.1 on Laravel with composer to begin migrating my KoolReports there.
I added the core and datagrid folders to vendor > koolreport
where the laravel
folder was installed by composer. I then added one of my reports in the App\Reports
folder. The file is named SecurityLog.php
and shown here.
<?php
namespace App\Reports;
class SecurityLog extends \koolreport\KoolReport
{
use \koolreport\laravel\Friendship;
function setup()
{
$this->src("my_database")
->query("SELECT * FROM security")
->pipe($this->dataStore("security"));
}
}
I installed the view, controller and blade files as well. I also added the route designation I am using and got this error: "Class 'koolreport\KoolReport' not found"
Here is my Laravel error log:
local.ERROR: Class 'koolreport\KoolReport' not found {"userId":1,"exception":"[object] (Symfony\\Component\\Debug\\Exception\\FatalErrorException(code: 1): Class 'koolreport\\KoolReport' not found at G:\\wamp\\www\\jasnia\\app\\Reports\\SecurityLog.php:7)
I cleared cache in Laravel, ran composer dump-autoload. I checked composer.json and "koolreport/laravel": "^2.0"
is there. I do not see that the composer autoloader has written any declaration for koolreport to the config\app.php
file. Is it supposed to?
Thanks for your help in advance!