I am attempting to export a report from Laravel. When I specify a view in the export method it tells me it can't save to the temp directory. If I don't include a view it works without issue (just ugly with the inputs fields) I'm not really sure what I'm missing here. I do notice a .tmp file being created but they are all blank. When I remove that view and the exports. In the tmp directory there is a .tmp and .pdf
Path to RegionalReport.php - App/Reports/tenant
Path: App/Reports/tenant
regionalReportPdf.view.php
<html lang="en">
<head>
<title></title>
</head>
<body>
This is just a test
</body>
</html>
ExportsController.php with custom view
`
php
<?php
class ExportsController extends Controller
{
public function regional()
{
$report = (new RegionalReport())->run();
return $report->export('regionalReportPdf')->settings([
"useLocalTempFolder"=>true,
"autoDeleteTempFile" => true,
])->pdf([
"format"=>"A4",
"orientation"=>"portrait"
])->toBrowser(now()->timezone('America/Los_Angeles')->format('Ymd') . 'regional_compliance');
}
}
?>
`ExportsController.php without custom view and works fine`
php
class ExportsController extends Controller
{
public function regional()
{
$report = (new RegionalReport())->run();
return $report->export()->settings([
"useLocalTempFolder"=>true,
"autoDeleteTempFile" => true,
])->pdf([
"format"=>"A4",
"orientation"=>"portrait"
])->toBrowser(now()->timezone('America/Los_Angeles')->format('Ymd') . 'regional_compliance');
}
}
`
Here is the full stack if it helps https://flareapp.io/share/J7oev0Gm