QuotationReport.view.php
<html>
<head>
<title>hameer</title>
</head>
<body>
<p>hameer</p>
</body>
</html>
QuotationReportPdf.view.php
<html>
<head>
<title>hameer</title>
</head>
<body>
<p>hameer</p>
</body>
</html>
export code
$quotationPdf = new QuotationReport(array("data"=>array($data)));
//$quotationPdf = new QuotationReport();
$quotationPdf->run()->export('QuotationReportPdf')
->pdf(array(
"format"=>"A4",
"orientation"=>"portrait",
//"zoom"=>2
))
->toBrowser("quotation.pdf");
Quotation Class
<?php
namespace App\Services\CPM\ReportService;
use App\Services\App\ReportService;
class QuotationReport extends ReportService
{
use \koolreport\export\Exportable;
public function __construct($params = array())
{
parent::__construct($params);
}
public function settings()
{
return array(
"dataSources"=>array(
"all_data"=>array(
"class"=>'\koolreport\datasources\ArrayDataSource',
"data"=>$this->params["data"]
)
)
);
}
public function setup()
{
$this->src('all_data')
->pipe($this->dataStore('quotation_data'));
}
}
ReportService Class
<?php
namespace App\Services\App;
abstract class ReportService extends \koolreport\KoolReport
{
use \koolreport\laravel\Friendship;
}