11import Vue from 'vue' ;
2+ import Vuex from 'vuex' ;
3+ import vuexI18n from 'vuex-i18n' ;
24import VueRouter from 'vue-router' ;
5+
6+ // Helpers
37import { Ziggy } from './helpers/ziggy' ;
8+ import Locales from './../../../../resources/i18n/locales' ;
49
510// Base Vuejs Templates
611import Login from './components/auth/Login' ;
712
8- /**
9- * First we will load all of this project's JavaScript dependencies which
10- * includes Vue and other libraries. It is a great starting point when
11- * building robust, powerful web applications using Vue and Laravel.
12- */
13-
14- require ( './bootstrap' ) ;
15-
13+ // Used for the route() helper.
1614window . Ziggy = Ziggy ;
1715
18- /**
19- * Next, we will create a fresh Vue application instance and attach it to
20- * the page. Then, you may begin adding components to this application
21- * or customize the JavaScript scaffolding to fit your unique needs.
22- */
16+ Vue . use ( Vuex ) ;
2317
18+ const store = new Vuex . Store ( ) ;
2419const route = require ( './../../../../vendor/tightenco/ziggy/src/js/route' ) . default ;
2520
2621Vue . config . productionTip = false ;
@@ -31,6 +26,10 @@ Vue.mixin({
3126} ) ;
3227
3328Vue . use ( VueRouter ) ;
29+ Vue . use ( vuexI18n . plugin , store ) ;
30+
31+ Vue . i18n . add ( 'en' , Locales . en ) ;
32+ Vue . i18n . set ( 'en' ) ;
3433
3534const router = new VueRouter ( {
3635 routes : [
@@ -41,6 +40,9 @@ const router = new VueRouter({
4140 ]
4241} ) ;
4342
43+ require ( './bootstrap' ) ;
44+
4445const app = new Vue ( {
46+ store,
4547 router,
4648} ) . $mount ( '#pterodactyl' ) ;
0 commit comments