My table view right now,
I would like to make like this,
My controller,
public function koolsearch(Request $request)
{
$report = new MyReport(array(
"min" => $request->min,
"agen" => $request->agen,
"sec" => $request->sec,
"sub_sec" => $request->sub_sec,
));
$report->run();
return view("Koolreport.report",["report"=>$report]);
}
MyReport.php, function setup()
{
$min = $this->params["min"];
$agen = $this->params["agen"];
$sec = $this->params["sec"];
$sub_sec = $this->params["sub_sec"];
$this->src("mysql")->query(MySQL::type(
DB::table("demands")->join('approved_project_info', 'approved_project_info.unapprove_project_id', '=', 'demands.project_id')
->where('ministry', $min)
))
->pipe($this->dataStore('demands'));
}
MyReport.view.php,
<?php
Table::create(array(
"dataSource"=>$this->dataStore("demands"),
"columns" => array(
"project_code" => array(
"label" => "Project Code",
"cssStyle"=>"border-right:none;"
),
"project_title" => array(
"label" => "Project Nmae (Implementation Period)",
),
"project_cost_total" => array(
"label" => "Total",
),
"project_aid" => array(
"label" => "PA",
),
//6 row start
//6 row end
"allocation_total" => array(
"label" => "Allocation Total",
),
"allocation_taka" => array(
"label" => "Taka",
),
"capital" => array(
"label" => "Capital ",
),
"capital_revenue" => array(
"label" => "Revenue",
),
"cdvat" => array(
"label" => "CDVAT",
),
"cdvat_pa" => array(
"label" => "Project Aid",
),
"allocation_others" => array(
"label" => "Others",
),
),
"cssClass"=>array(
"table"=>"table table-bordered",
"tr"=>"row-css-class",
"th"=>"header-css-class",
"td"=>"cell-css-class",
"tf"=>"footer-cell-css-class",
)
))
?>
My Report.blade.php,
<tbody>
<?php echo $report->render(); ?>
</tbody>