window.Vue = require('vue');

window._ = require('lodash');

window.axios = require('axios');

window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';

let token = document.head.querySelector('meta[name="csrf-token"]');

if (token) {
    window.axios.defaults.headers.common['X-CSRF-TOKEN'] = token.content;
} else {
    console.error('CSRF token not found: https://laravel.com/docs/csrf#csrf-x-csrf-token');
}

import Vue from 'vue';
import Vuetify from 'vuetify';

import App from './App.vue';
import router from './route';
import store from './store';

// Vue.config.productionTip = false;

Vue.use(Vuetify);

const app = new Vue({
    el: '#app',
    router,
    store,
    render: h => h(App)
});
