Files
ladill-frontdesk/app/Services/Printers/PdfPrinterDriver.php
T
isaaccladandCursor 9e2d79936c
Deploy Ladill Frontdesk / deploy (push) Failing after 35s
Test / test (push) Failing after 2m45s
Initial Ladill Frontdesk release with deploy pipeline.
Visitor management app with SSO, kiosk, badges, reports, and Gitea CI deploy to frontdesk.ladill.com.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-27 20:37:15 +00:00

29 lines
648 B
PHP

<?php
namespace App\Services\Printers;
use App\Contracts\Printers\PrinterDriverInterface;
use App\Models\Visit;
use App\Services\Frontdesk\BadgeRenderService;
class PdfPrinterDriver implements PrinterDriverInterface
{
public function name(): string
{
return 'pdf';
}
public function renderBadge(Visit $visit): array
{
$visit->load(['visitor', 'host', 'organization']);
$html = app(BadgeRenderService::class)->renderHtml($visit, true);
return [
'format' => 'html',
'content' => $html,
'filename' => 'badge-'.$visit->badge_code.'.html',
];
}
}