@php $currencySymbol = App\Models\AppSetting::getValue('currency_symbol', '₹'); $currencyDecimals = App\Models\AppSetting::currencyDecimals(); $appFavicon = App\Models\AppSetting::getValue('app_favicon'); $brandingUrl = function (?string $path) { if (!$path) { return asset('favicon.ico'); } return str_starts_with($path, 'branding/') ? route('media.branding', ['file' => basename($path)]) : \Illuminate\Support\Facades\Storage::disk('public')->url($path); }; $pusherCluster = config('broadcasting.connections.pusher.options.cluster', 'mt1'); $savedPusherHost = App\Models\AppSetting::getValue('pusher_host', ''); $frontendPusherHost = $savedPusherHost ? preg_replace('/^api-/', 'ws-', $savedPusherHost) : 'ws-' . ($pusherCluster ?: 'mt1') . '.pusher.com'; $pusherRuntimeConfig = [ 'enabled' => config('broadcasting.default') === 'pusher', 'key' => config('broadcasting.connections.pusher.key'), 'cluster' => $pusherCluster, 'host' => $frontendPusherHost, 'port' => (int) config('broadcasting.connections.pusher.options.port', 443), 'scheme' => config('broadcasting.connections.pusher.options.scheme', 'https'), ]; @endphp