Fix guest runtime config serialization
This commit is contained in:
@@ -7,13 +7,16 @@
|
||||
<meta name="csrf-token" content="{{ csrf_token() }}">
|
||||
@viteReactRefresh
|
||||
@vite(['resources/css/app.css', 'resources/js/guest/main.tsx'])
|
||||
@php
|
||||
$guestRuntimeConfig = [
|
||||
'push' => [
|
||||
'enabled' => config('push.enabled', false),
|
||||
'vapidPublicKey' => config('push.vapid.public_key'),
|
||||
],
|
||||
];
|
||||
@endphp
|
||||
<script>
|
||||
window.__GUEST_RUNTIME_CONFIG__ = @json([
|
||||
'push' => [
|
||||
'enabled' => config('push.enabled', false),
|
||||
'vapidPublicKey' => config('push.vapid.public_key'),
|
||||
],
|
||||
]);
|
||||
window.__GUEST_RUNTIME_CONFIG__ = {!! json_encode($guestRuntimeConfig) !!};
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
Reference in New Issue
Block a user