Модуль отчетов
This commit is contained in:
16
app/Services/Reports/Export/ReportPdfExport.php
Normal file
16
app/Services/Reports/Export/ReportPdfExport.php
Normal file
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
|
||||
namespace App\Services\Reports\Export;
|
||||
|
||||
use App\Services\Reports\ReportPayload;
|
||||
use Barryvdh\DomPDF\Facade\Pdf;
|
||||
use Barryvdh\DomPDF\PDF as PdfDocument;
|
||||
|
||||
class ReportPdfExport
|
||||
{
|
||||
public static function render(ReportPayload $payload): PdfDocument
|
||||
{
|
||||
return Pdf::loadView('reports.pdf', ['payload' => $payload])
|
||||
->setPaper('a4', 'portrait');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user