Created
November 12, 2018 14:42
-
-
Save blackfyre/e775135bc72ec3c02e0019a61845602a to your computer and use it in GitHub Desktop.
Vuex for Laravel Nova Tools
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Vue from 'vue'; | |
import Vuex from 'vuex'; | |
import state from './store/state.js'; | |
import actions from './store/actions.js'; | |
import getters from './store/getters.js'; | |
import mutations from './store/mutations.js'; | |
Vue.use(Vuex); | |
Nova.booting((Vue, router) => { | |
Vue.component('your-tool', require('./components/Tool')); | |
Nova.proposalStore = new Vuex.Store({ | |
state, | |
actions, | |
getters, | |
mutations | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment