@props([ 'setting' => null, 'heading' => null, 'preview' => null, // The mailer's Message, passed down from the mail view so the logo can be // attached inline. Blade components don't inherit the parent view's data, // so every email that uses this shell has to hand it over explicitly. 'message' => null, ]) @php $primary = $setting?->primary_color ?: '#124a61'; $accent = $setting?->accent_color ?: '#2e86ab'; $company = $setting?->company_name ?: config('app.name'); // Inline (CID) attachment, not the base64 data URI used everywhere else: // Gmail and Outlook strip `data:` image sources, which is why the logo was // arriving as a broken image. Falls back to the data URI when this shell is // rendered outside a mail send (previews), where nothing strips it. $logo = null; if ($message instanceof \Illuminate\Mail\Message && ($logoFile = $setting?->logoAttachment())) { $logo = $message->embedData($logoFile['contents'], $logoFile['name'], $logoFile['mime']); } $logo ??= $setting?->logoSrc(); @endphp {{ $company }} @if ($preview)
{{ $preview }}
@endif
@if ($logo) {{ $company }} @endif
{{ $company }}
@if ($heading)
{{ $heading }}
@endif
{{ $slot }}
{{ $company }} @if ($setting?->email)
{{ $setting->email }}@endif @if ($setting?->phone)  ·  {{ $setting->phone }}@endif @if ($setting?->website)
{{ $setting->website }}@endif