I'm getting an error when attempting to export. Here's the error: [2020-09-30 10:21:40] local.ERROR: Could not save content to temporary folder
I am using window 8 and xampp and laravel. My code is below.
MyReport.php
<?php
namespace App\Modules\Report;
class MyReport extends \koolreport\KoolReport
{
use \koolreport\export\Exportable;
}
?>
MyReport.view.php
<html>
<body style="margin: 1in">
<div class='page-header' style='height:30px'>
<span>Header</span>
</div>
...
...
<div class='page-footer' style='height:30px'>
<span>Footer</span>
</div>
</body>
</html>
CertificateController.php
<?php
namespace App\Modules\Report;
use App\Modules\Report\MyReport;;
class CertificateController extends Controller
{
public function index(Request $request){
try{
$report = new MyReport();
$report->run();
$report->export("MyReport")->settings(
array(
"useLocalTempFolder"=>true,
))->pdf(array(
"format"=>"A4",
"orientation"=>"portrait"
))->toBrowser("report.pdf", true);
}catch(\Exception $e){
Log::error($e->getMessage());
return view('error.home');
return false;
}
}
}
?>
Can you help me where I am going wrong.