@php $kopProfil = $profil ?? \App\Models\ProfilePerusahaan::first(); $kopLogoUri = null; if ($kopProfil && $kopProfil->logo_path && \Illuminate\Support\Facades\Storage::disk('public')->exists($kopProfil->logo_path)) { $kopExt = strtolower(pathinfo($kopProfil->logo_path, PATHINFO_EXTENSION)); $kopMime = $kopExt === 'jpg' ? 'image/jpeg' : 'image/' . $kopExt; $kopLogoUri = 'data:' . $kopMime . ';base64,' . base64_encode(\Illuminate\Support\Facades\Storage::disk('public')->get($kopProfil->logo_path)); } @endphp @if ($kopProfil)
|
@if ($kopLogoUri)
|
{{ $kopProfil->nama_perusahaan }} @php $defaultKop = trim( ($kopProfil->alamat ? $kopProfil->alamat . "\n" : '') . ($kopProfil->telepon ? 'Telp: ' . $kopProfil->telepon : '') . ($kopProfil->telepon && $kopProfil->email ? ' | ' : '') . ($kopProfil->email ? 'Email: ' . $kopProfil->email : '') ); @endphp {!! nl2br(e($kopProfil->kop_header ?: $defaultKop)) !!} |