@php use App\Models\Utility; // 1. Fetch ALL settings for the current business once to avoid multiple DB hits $settings = \App\Models\Utility::settings(); // 2. Reference the $settings array directly instead of calling getValByName (which defaults to ID 1) $logo = \App\Models\Utility::get_file('uploads/logo'); // Use the keys from your 'settings' table screenshot $company_favicon = isset($settings['favicon']) ? $settings['favicon'] : 'favicon.png'; $logo_light = isset($settings['logo_light']) ? $settings['logo_light'] : 'logo-light.png'; $logo_dark = isset($settings['logo_dark']) ? $settings['logo_dark'] : 'logo-dark.png'; // 3. Set Color and Dark Mode from the business-specific $settings $color = !empty($settings['color']) ? $settings['color'] : 'theme-3'; // This fix enables the Dark Layout based on your DB screenshot (id 271) $style = (isset($settings['cust_darklayout']) && $settings['cust_darklayout'] == 'on') ? 'dark-layout' : ''; // 4. Update RTL and Language to use Business Admin settings $SITE_RTL = isset($settings['SITE_RTL']) ? $settings['SITE_RTL'] : 'off'; $lang = isset($settings['default_language']) ? $settings['default_language'] : 'en'; // 5. Layout Mode (Transparent/Sidebar settings) $cust_theme_bg = isset($settings['cust_theme_bg']) ? $settings['cust_theme_bg'] : 'on'; @endphp {{-- --}} {{-- {{(Utility::getValByName('title_text')) ? Utility::getValByName('title_text') : config('app.name', 'BizGrow')}} - @yield('page-title') --}} BizGrow Business Admin @if (View::hasSection('page-title')) - @yield('page-title') @endif {{-- --}} @if ($SITE_RTL == 'on') @endif @if (isset($setting['cust_darklayout']) && $setting['cust_darklayout'] == 'on') @else @endif @stack('css-page')
@include('business.partials.menu') @include('business.partials.header')
@yield('content')
@include('business.partials.footer')