@php // Detect current site by domain and load its logo + name from the sites table. $navHost = preg_replace('/^www\./i', '', request()->getHost()); $navSite = \App\Models\Admin\Site::where('site_url', 'LIKE', '%' . $navHost . '%') ->where('is_active', 1) ->first(); $navLogo = ($navSite && $navSite->image) ? asset('storage/site_images/' . $navSite->image) : asset('images/logo.png'); $navSiteName = $navSite ? $navSite->site_name : config('app.name', 'Global Transportation'); @endphp