Dev/v1.1 (#2)
Co-authored-by: ISMAIL MASSERAN <topaz@ISMAILs-Macbook.local> Reviewed-on: #2
This commit was merged in pull request #2.
This commit is contained in:
@@ -33,7 +33,7 @@ class LetterService
|
||||
*/
|
||||
public function pdfResponse(string $view, array $data = [], string $filename = 'letter.pdf'): Response
|
||||
{
|
||||
$pdf = $this->makeBrowsershot($this->renderHtml($view, $data))->pdf();
|
||||
$pdf = $this->renderPdf($view, $data);
|
||||
|
||||
return response($pdf, SymfonyResponse::HTTP_OK, [
|
||||
'Content-Type' => 'application/pdf',
|
||||
@@ -41,6 +41,14 @@ class LetterService
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array<string, mixed> $data
|
||||
*/
|
||||
public function renderPdf(string $view, array $data = []): string
|
||||
{
|
||||
return $this->makeBrowsershot($this->renderHtml($view, $data))->pdf();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array<string, mixed> $overrides
|
||||
* @return array<string, mixed>
|
||||
|
||||
Reference in New Issue
Block a user