I am finding the rendering of tables is showing two tables on my page, one formatted and the other not.
I used the code from the example on the website:
MyReport.php - <?php //MyReport.php require_once APPPATH."../vendor/autoload.php";
use \koolreport\codeigniter\Friendship;// All you need to do is to claim this friendship
class MyReport extends \koolreport\KoolReport {
function settings()
{
return array(
"dataSources"=>array(
"automaker"=>array(
"connectionString"=>"mysql:host=localhost;dbname=automaker",
"username"=>"root",
"password"=>"",
"charset"=>"utf8"
),
)
);
}
protected function setup()
{
$this->src('automaker')
->query("SELECT employeeNumber, firstName,lastName,jobTitle, extension from employees")
->pipe($this->dataStore("employees"));
}
}
MyReport.view.php
<?php
require_once APPPATH."../vendor/autoload.php";
use \koolreport\datagrid\DataTables;
?> <div class="report-content">
<div class="text-center">
<h1>DataTables</h1>
<p class="lead">
The minimum settings to get DataTables working
</p>
</div>
<?php
DataTables::create(array(
"dataSource"=>$this->dataStore("employees"),
"themeBase"=>"bs4", // Optional option to work with Bootsrap 4
"cssClass"=>array(
"table"=>"table table-striped table-bordered"
)
));
?>
</div>