mutations: {
setCards: (state, payload) => {
state.data = payload;
},
},
actions: {
cardsFromDb ({ state, commit, rootState }) {
Vue.http.get(`${rootState.apiUrl}cards`).then(response => {
commit('setCards', response.data);
}, response => {
// error callback
});
}
}
$query = mysql_query("UPDATE `catch` SET `hide` = '1' WHERE `id` = {$id}");
import Vue from "vue";
import App from "./App.vue";
import router from './router';
import Navbar from './components/Navbar.vue';
Vue.use(router);
Vue.component('navbar', Navbar);
Vue.config.productionTip = true;
new Vue({
router,
render: h => h(App)
}).$mount("#app");