@props(['title' => 'Dashboard', 'subtitle' => null]) @php $__siteName = \App\Models\SystemSetting::get('site_name', config('app.name', 'MailTrixy')); $__favicon = \App\Models\SystemSetting::get('favicon'); @endphp {{ $title }} — {{ $__siteName }} Admin {{-- Favicon --}} @if($__favicon) @else @endif {{-- Dynamic brand colors from admin settings --}} @php $__brandColor = \App\Models\SystemSetting::get('primary_color'); $__brandStrong = \App\Models\SystemSetting::get('secondary_color'); $__accentColor = \App\Models\SystemSetting::get('accent_color'); @endphp @if($__brandColor || $__brandStrong || $__accentColor) @endif {{-- Google Fonts: Outfit --}} {{-- Vite --}} @vite(['resources/css/app.css', 'resources/js/app.js']) @livewireStyles {{-- Admin-defined custom CSS + head HTML (analytics, custom meta, etc.) --}} @php $__customCss = \App\Models\SystemSetting::get('custom_css', ''); @endphp @if(trim($__customCss) !== '') @endif {!! \App\Models\SystemSetting::get('head_code', '') !!} {{-- Progress Bar --}}
{{-- ═══════════════════════════════════════════════ SIDEBAR ═══════════════════════════════════════════════ --}} {{-- Mobile sidebar overlay --}} {{-- ═══════════════════════════════════════════════ MAIN CONTENT ═══════════════════════════════════════════════ --}}
{{-- Header --}}
{{-- Left side --}}
{{-- Mobile hamburger --}}

{{ __('Admin Console') }}

{{ $title }}

@if($subtitle)

{{ $subtitle }}

@endif
{{-- Right side --}}
{{-- Live Search --}} {{-- Fullscreen toggle --}} {{-- Language switcher --}} {{-- Notification bell --}} @php $openTickets = \Illuminate\Support\Facades\DB::table('tickets')->where('status', 'open')->count(); $recentUsers = \App\Models\User::where('created_at', '>=', now()->subDay())->count(); $failedPayments = \Illuminate\Support\Facades\DB::table('payments')->where('status', 'failed')->where('created_at', '>=', now()->subDays(7))->count(); $pendingJobs = \Illuminate\Support\Facades\DB::table('failed_jobs')->count(); $newWorkspaces = \Illuminate\Support\Facades\DB::table('workspaces')->where('created_at', '>=', now()->subDay())->count(); $activeNow = \Illuminate\Support\Facades\DB::table('sessions')->where('last_activity', '>=', now()->subMinutes(5)->timestamp)->count(); $notifCount = $openTickets + $recentUsers + $failedPayments + $pendingJobs; @endphp
{{-- Admin user --}}
{{-- Page content --}}
{{-- Flash messages --}} @if(session('success')) @endif @if(session('error')) @endif {{ $slot }}
{{-- max-w-7xl --}}
@livewireScripts {{-- Admin-defined raw HTML rendered before (analytics, chat widgets, etc.) --}} {!! \App\Models\SystemSetting::get('footer_code', '') !!}