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>
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
<?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',
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user