DONE: generate letter after the membership-application is completed

This commit is contained in:
ISMAIL MASSERAN
2026-07-02 10:08:19 +08:00
parent 9e9867217f
commit 4dcd135c32
20 changed files with 679 additions and 38 deletions
+9 -1
View File
@@ -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>