I am trying to use 3 different Date pickers on 3 separate charts, and I am having an issue getting the parameters set up correctly.
My Code:
<?php
// Require autoload.php from koolreport library
require_once "../vendor/autoload.php";
// //Specify some data processes that will be used to process
use koolreport\processes\Group;
use koolreport\processes\Sort;
use koolreport\processes\Limit;
use koolreport\processes\ColumnRename;
//Define the class
class MyReport2 extends \koolreport\KoolReport
{
use \koolreport\clients\Bootstrap;
use \koolreport\amazing\Theme;
use \koolreport\inputs\Bindable;
use \koolreport\inputs\POSTBinding;
protected function defaultParamValues()
{
$year = date("Y") . '-01-01 00:00:00';
$today = date("Y-m-d") . ' 23:59:59';
return array(
"permitTypeDate"=>array(
$year,
$today
),
"permitStatusDate"=>array(
$year,
$today
),
"purchaseDate"=>array(
$year,
$today
),
);
}
protected function bindParamsToInputs()
{
return array(
"permitTypeDate"=>"permitTypeDate",
"permitStatusDate"=>"permitStatusDate",
"purchaseDate"=>"purchaseDate",
);
}
public function settings()
{
return array(
"dataSources" => array(
"automaker" => array(
'connectionString' => 'sqlsrv:Server=' . getenv("DB_HOST") . ';Database=' . getenv("DB_NAME") . '',
'username' => getenv("DB_USER"),
'password' => getenv("DB_PASS"),
),
)
);
}
When I try to run this I get an error that states, 0Cannot use object of type Permit as array ../vendor/koolreport/inputs/Bindable.phpline 29
I am not sure what is going on and could use some help in this situation