{{-- Standalone layout for pages that are opened to be printed, or saved as a PDF from the browser's print dialog. It deliberately does not extend the admin layout: the sidebar, top bar and dashboard chrome have no place on paper, and hiding them with print CSS still leaves their fonts and scripts loading. On screen the document sits on a grey desk as an A4 sheet with a small toolbar; in print the toolbar disappears and the sheet fills the page. Sections a page provides: title - browser tab / PDF file name doc_title - large heading on the right, e.g. TOUR ENQUIRY doc_no - the reference under it doc_badge - optional status pill markup document - the body doc_footer - optional text under the standard footer line Optional variables: $autoPrint (opens the print dialog on load), $backUrl. --}} @php use App\Models\Setting; use App\Support\DocumentBrand; $business = Setting::businessSettings(); ['brand' => $brand, 'brandDark' => $brandDark] = DocumentBrand::colors($business); $logoUrl = Setting::fileUrl($business['business_logo'] ?? null); $businessName = ($business['business_name'] ?? null) ?: Setting::brandName(); @endphp @yield('title', 'Document') - {{ $businessName }} @stack('styles')
Use Print and choose "Save as PDF" in the dialog to download a copy.
@if (!empty($backUrl)) Back @endif
@if ($logoUrl) @endif

{{ $businessName }}

@if (!empty($business['business_address']))

{{ $business['business_address'] }}

@endif @if (!empty($business['business_phone']) || !empty($business['business_email']))

{{ collect([$business['business_phone'] ?? null, $business['business_email'] ?? null])->filter()->implode(' · ') }}

@endif

@yield('doc_title')

@yield('doc_no')

@hasSection('doc_badge')
@yield('doc_badge')
@endif
@yield('document')
@if (!empty($autoPrint)) @endif @stack('scripts')