Fix guest runtime config serialization
This commit is contained in:
@@ -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'])
|
||||||
|
@php
|
||||||
|
$guestRuntimeConfig = [
|
||||||
|
'push' => [
|
||||||
|
'enabled' => config('push.enabled', false),
|
||||||
|
'vapidPublicKey' => config('push.vapid.public_key'),
|
||||||
|
],
|
||||||
|
];
|
||||||
|
@endphp
|
||||||
<script>
|
<script>
|
||||||
window.__GUEST_RUNTIME_CONFIG__ = @json([
|
window.__GUEST_RUNTIME_CONFIG__ = {!! json_encode($guestRuntimeConfig) !!};
|
||||||
'push' => [
|
|
||||||
'enabled' => config('push.enabled', false),
|
|
||||||
'vapidPublicKey' => config('push.vapid.public_key'),
|
|
||||||
],
|
|
||||||
]);
|
|
||||||
</script>
|
</script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|||||||
Reference in New Issue
Block a user