@php try { $appName = \App\Models\Setting::get('app_name', config('app.name', 'MailPurse')); } catch (\Throwable $e) { $appName = config('app.name', 'MailPurse'); } if (!is_string($appName)) { $appName = config('app.name', 'MailPurse'); } @endphp @php $pageTitle = trim($__env->yieldContent('title', 'Admin')); @endphp {{ __($pageTitle) }} - {{ $appName }} @php $fontFamily = \App\Models\Setting::get('admin_font_family', 'Inter'); $fontWeights = \App\Models\Setting::get('admin_font_weights', '400,500,600,700'); $fontWeightsUrl = preg_replace('/\s*,\s*/', ';', $fontWeights); // Convert font name to Google Fonts format (replace spaces with +) $fontFamilyUrl = str_replace(' ', '+', $fontFamily); // Build Google Fonts URL $googleFontsUrl = "https://fonts.googleapis.com/css2?family={$fontFamilyUrl}:wght@{$fontWeightsUrl}&display=swap"; @endphp @php try { $brandColor = \App\Models\Setting::get('brand_color', '#3b82f6'); } catch (\Throwable $e) { $brandColor = '#3b82f6'; } $brandColor = is_string($brandColor) ? trim($brandColor) : '#3b82f6'; if ($brandColor === '' || !preg_match('/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/', $brandColor)) { $brandColor = '#3b82f6'; } $brandHex = ltrim($brandColor, '#'); if (strlen($brandHex) === 3) { $brandHex = $brandHex[0] . $brandHex[0] . $brandHex[1] . $brandHex[1] . $brandHex[2] . $brandHex[2]; } $brandR = hexdec(substr($brandHex, 0, 2)); $brandG = hexdec(substr($brandHex, 2, 2)); $brandB = hexdec(substr($brandHex, 4, 2)); @endphp @vite(['resources/css/app.css', 'resources/js/app.js']) @stack('styles') @php $disableMainScroll = request()->routeIs('admin.ai-tools.email-text-generator'); @endphp
@if(false) @endif {{-- Main Content --}}
{{-- Top Bar --}}
{{-- Left: title + search --}}
@php $pageHeading = trim($__env->yieldContent('page-title', 'Dashboard')); @endphp

{{ __($pageHeading) }}

{{-- Search on the right of title --}}
{{-- Right actions --}}
{{-- Notifications --}} @admincan('admin.notifications.access')
{{-- Notifications dropdown --}}

{{ __('Notifications') }}

@admincan('admin.notifications.edit') @endadmincan

@if($unreadCount > 0) {{ $unreadCount }} {{ __('unread') }} @else {{ __('Up to date') }} @endif

@php $notifications = auth('admin')->check() ? auth('admin')->user()->notifications()->latest()->limit(10)->get() : collect(); @endphp @forelse($notifications as $notification) @php $notificationUrl = is_array($notification->data) && is_string($notification->data['url'] ?? null) ? $notification->data['url'] : null; @endphp @if(is_string($notificationUrl) && trim($notificationUrl) !== '')

{{ $notification->data['title'] ?? __('Notification') }}

@if(!empty($notification->data['message']))

{{ $notification->data['message'] }}

@endif

{{ $notification->created_at->diffForHumans() }}

@else

{{ $notification->data['title'] ?? __('Notification') }}

@if(!empty($notification->data['message']))

{{ $notification->data['message'] }}

@endif

{{ $notification->created_at->diffForHumans() }}

@endif @empty
{{ __('No notifications yet.') }}
@endforelse
@endadmincan @php $activeLocales = \App\Models\TranslationLocale::query() ->where('is_active', true) ->orderBy('code') ->get(['code', 'name']); $currentLocale = (string) app()->getLocale(); $currentLocale = trim($currentLocale) !== '' ? $currentLocale : 'en'; @endphp @if($activeLocales->count() > 1)
@foreach($activeLocales as $loc)
@csrf
@endforeach
@endif {{-- Profile dropdown --}}
{{-- Dropdown menu --}}
{{-- Page Content --}}
@php $success = session()->pull('success'); @endphp @if($success)
{{ $success }}
@endif @php $error = session()->pull('error'); @endphp @if($error)
{{ $error }}
@endif @if(session('info'))
{{ session('info') }}
@endif @if($errors->any())
    @foreach($errors->all() as $error)
  • {{ $error }}
  • @endforeach
@endif @yield('content')
@stack('scripts')