@php $branchId = auth()->check() ? auth()->user()->branch_id : null; $storeName = trim((string) ($storeName ?? \App\Services\SettingsService::getStoreName($branchId))); $pageTitle = trim($__env->yieldContent('title', 'POS System')); if (!empty($storeName) && !str_contains($pageTitle, $storeName)) { $pageTitle .= ' - ' . $storeName; } $faviconLogo = \App\Services\SettingsService::get('store_logo', null, $branchId); $faviconPath = $faviconLogo ? public_path('uploads/logo/' . $faviconLogo) : null; $faviconUrl = $faviconLogo ? asset('uploads/logo/' . $faviconLogo) . (file_exists($faviconPath) ? '?v=' . filemtime($faviconPath) : '') : null; $faviconMime = match (strtolower(pathinfo($faviconLogo ?? '', PATHINFO_EXTENSION))) { 'png' => 'image/png', 'jpg', 'jpeg' => 'image/jpeg', 'gif' => 'image/gif', 'webp' => 'image/webp', 'svg' => 'image/svg+xml', default => 'image/x-icon', }; @endphp {{ $pageTitle }} @if($faviconLogo) @else @endif @yield('head') @php $currentTheme = auth()->check() ? \App\Services\SettingsService::get('theme', 'blue', auth()->user()->branch_id) : \App\Services\SettingsService::get('theme', 'blue', null); $themes = \App\Services\SettingsService::getAvailableThemes(); $theme = $themes[$currentTheme] ?? $themes['blue']; @endphp @stack('styles') @yield('content')
@stack('scripts')