Skip to content

Instantly share code, notes, and snippets.

@blackfyre
Created November 12, 2018 14:42
Show Gist options
  • Save blackfyre/e775135bc72ec3c02e0019a61845602a to your computer and use it in GitHub Desktop.
Save blackfyre/e775135bc72ec3c02e0019a61845602a to your computer and use it in GitHub Desktop.
Vuex for Laravel Nova Tools
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