From 75cbb0e1ab5cfcefeb288501d3123f499cdf63c9 Mon Sep 17 00:00:00 2001 From: Bubka <858858+Bubka@users.noreply.github.com> Date: Fri, 22 Sep 2023 11:32:24 +0200 Subject: [PATCH] Set up global immutable app properties --- resources/js_vue3/app.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/resources/js_vue3/app.js b/resources/js_vue3/app.js index 28f98971..b11d5c67 100644 --- a/resources/js_vue3/app.js +++ b/resources/js_vue3/app.js @@ -9,6 +9,15 @@ import Notifications from '@kyvg/vue3-notification' const app = createApp(App) +// Immutable app properties provided by the laravel blade view +app.config.globalProperties.$2fauth = { + config: window.appConfig, + version: window.appVersion, + isDemoApp: window.isDemoApp, + isTestingApp: window.isTestingApp, + langs: window.appLocales +} + // app.use(createPinia()) app.use(router) app.use(Notifications)