Fix guest runtime config serialization

This commit is contained in:
Codex Agent
2025-11-12 21:06:28 +01:00
parent 574aa47ce7
commit a4feb431fb

View File

@@ -7,13 +7,16 @@
<meta name="csrf-token" content="{{ csrf_token() }}"> <meta name="csrf-token" content="{{ csrf_token() }}">
@viteReactRefresh @viteReactRefresh
@vite(['resources/css/app.css', 'resources/js/guest/main.tsx']) @vite(['resources/css/app.css', 'resources/js/guest/main.tsx'])
<script> @php
window.__GUEST_RUNTIME_CONFIG__ = @json([ $guestRuntimeConfig = [
'push' => [ 'push' => [
'enabled' => config('push.enabled', false), 'enabled' => config('push.enabled', false),
'vapidPublicKey' => config('push.vapid.public_key'), 'vapidPublicKey' => config('push.vapid.public_key'),
], ],
]); ];
@endphp
<script>
window.__GUEST_RUNTIME_CONFIG__ = {!! json_encode($guestRuntimeConfig) !!};
</script> </script>
</head> </head>
<body> <body>