load(['visitor', 'host', 'organization']); $html = app(BadgeRenderService::class)->renderHtml($visit, true); return [ 'format' => 'html', 'content' => $html, 'filename' => 'badge-'.$visit->badge_code.'.html', ]; } }