@php if ($team->backgroundImage) { $backgroundPath = storage_path('app/public' . $team->backgroundImage->url); $mimeType = $team->backgroundImage->media_type ?? 'image/png'; } else { $backgroundPath = public_path('/img/certificate_' . $direction . '.png'); $mimeType = 'image/png'; } if (file_exists($backgroundPath)) { $backgroundData = base64_encode(file_get_contents($backgroundPath)); $background = "data:" . $mimeType . ";base64," . $backgroundData; } else { // Fallback to default if custom background is missing $backgroundPath = public_path('/img/certificate_' . $direction . '.png'); if (file_exists($backgroundPath)) { $backgroundData = base64_encode(file_get_contents($backgroundPath)); $background = "data:image/png;base64," . $backgroundData; } else { $background = ""; } } @endphp {!! __("team-certificate.certificate.title") !!}
{!! __("team-certificate.certificate.title") !!}
{!! __("team-certificate.certificate.prefix") !!} {{ $user->name }} {!! __("team-certificate.certificate.postfix") !!} @if ($user->team->registration_number_name) ({{ $user->team->registration_number_name }}: {{ $user->registration_number ?? '未登録' }}) @endif
{!! str_replace('{$team}', $team->name, str_replace('{$quiz}', $quizResult->survey->name, $team->certificate_text)) !!}

{{ $quizResult->start_at ? $quizResult->start_at->format('Y.m.d'): date("Y.m.d") }} {{ $team->leader_title }} {{ $team->leader }}